2,245 Posted Topics
Re: [B]default.aspx.designer.cs[/B] : That is the designer file generated by the IDE. You will see a .designer.cs for every web form you have. They are required and you don't need to touch them. [B]webapplication2.csproject.user[/B]: this holds information for the IDE like what tabs you had open when you closed the project, … | |
Re: Zip your project and upload it. You can do this by clicking "Go Advanced" next to "Post Quick Reply", and in the next screen click on manage attachments. | |
Re: If your application crashes before [icode]Application.Run[/icode] is called and the process enters the main loop then try..catch blocks will not catch the exception, nor will the Application.ThreadException event. What you need to do in this case is run the application and redirect the stdout/stderr to a file and read the … | |
Re: Did you check the computer for spyware/malware/spamware/viriware/*ware? Also check your C:\windows\system32\drivers\etc\hosts file to make sure their ad hosts are not being blocked, and then check your software firewall on the affected machine. | |
Re: After you login just call a redirect based on the day of year: [code] string url = string.Format("/page_{0:F0}.aspx", DateTime.Today.DayOfYear); Response.Redirect(url); [/code] You could also use the method cVz posted if you are using a database. | |
Re: You need to construct the query dynamically in your .ASP page's code-behind file. [code=c#] private void button1_Click(object sender, EventArgs e) { StringBuilder Sql = new StringBuilder(); Sql.AppendLine("Select *"); Sql.AppendLine("From Table"); if (!string.IsNullOrEmpty(textBox1.Text)) { Sql.AppendLine(string.Format("Where Name Like '{0}'", textBox1.Text)); } string query = Sql.ToString(); //Execute the query } [/code] | |
Re: You should use parameterized SQL and this won't be an issue any more. This is one reason dealing with DateTimes as string is a bad idea :) Here is an example: [code] public static string BuildSqlNativeConnStr(string server, string database) { return string.Format("Data Source={0};Initial Catalog={1};Integrated Security=True;", server, database); } private void … | |
Re: Did you copy and paste your XML example from internet explorer? IE adds those leading dashes to XML nodes -- but parses don't recognize them. | |
| |
Re: Start -- Settings -- Control Panel -- Computer Management -- System Tools -- Local Users and groups -- Users -- <locate your user> -- check the "Member Of" tab to see if you're in the debugger group or the administrator group. Also are you logging on the machine locally or … | |
Re: Add a member to the class to indicate it has been saved: [code] Public Class frmSave Dim saved As Boolean = False Private Sub ButtonSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSave.Click saved = True Me.Close() End Sub Private Sub ButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) … | |
Re: If you want to exit out of code completely call [icode]Application.Exit()[/icode]. Is this what you were referring to? | |
Re: What are you trying to accomplish here? I only can only think of one type of software that behaves like this............. Please elaborate | |
Re: Yes. You need to browse to the internal IP of the machine running IIS. You can find your IP Address by opening the command prompt and running the following command: [code=dos] C:\>ipconfig /all | find "IP Address" IP Address. . . . . . . . . . . . … | |
Re: That is not nearly enough information to even begin helping you. Please elaborate more on your schema and desired results. | |
Re: Here is a not so simple way to do it. Ideally using the name as Diamonddrake provided would be the best so you know what button you are referencing. To find all of the buttons you could use this approach: [code] private void button3_Click(object sender, EventArgs e) { Button[] btns … | |
Re: Sure. That is actually what I would recommend for a local database if you didn't want to use Access, SQL, etc. Just be aware of the limitiations! The only real problems with doing this is: 1) When you serialize the dataset it writes the entire contents to hard disk again … | |
Re: I would give it a shot and see if it fails first. This may not be an issue. I'm not sure what the switches are for solaris10 though. | |
Re: If access the \\machine\share only works when you are logged on as administrator and not a normal user then that is a security issue. You need to grant the user account access to see that share. This is more of a windows security issue than a code issue. | |
In the [URL="http://www.daniweb.com/forums/forum61.html"]C# Forum[/URL] I have a [URL="http://www.daniweb.com/code/snippet217409.html"]code snippet[/URL] which has spilled on to the second page of comments, but the link to [URL="http://www.daniweb.com/code/snippet217409-2.html"]page two[/URL] doesn't work | |
Re: I think you may consider abandoning string format because you're getting more in to formatting a line than an individual value. [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmStringFormat : Form { public frmStringFormat() … | |
Re: A windows or linux script? Either machine could initiate the copy depending on how you have the shares set up. | |
Re: I think this is what you want: [code=sql] Select *, ( Select Count(*) From products (NOLOCK) Where products.idCategory = categories.id and products.listhidden = 0 ) As Amount From categories Order By categoryDesc [/code] | |
Re: I believe you can use the memo datatype in access to store BLOB/large text. I would not recommend using a database for localization. | |
Re: It sounds like GRUB has been installed in the MBR. You should be able to run [icode]fdisk /mbr[/icode] from your windows installation media to overwrite the boot loader. | |
Re: I have posted a sample application using an SQL Connection, but you change the SqlConnection to OleDbConnection, SqlCommand to OleDbCommand, etc. [url]http://www.daniweb.com/code/snippet217409.html[/url] For generating the access connection string: [code] public static string BuildAccessConnectionString(string Filename, string Username, string Password, string DatabasePassword) { return string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='{0}';User Id={1};Password={2};Jet OLEDB:Database Password={3};", Filename.Replace("'", "''"), Username, … | |
Re: You don't want to do this with a trigger, and you probably don't want to do this altogether. Deletes like that should be done using PK/FK constraints and enabling cascading deletes. Take a look here to set that up: [url]http://www.google.com/search?hl=en&source=hp&q=MSSQL+Cascading+delete&aq=f&oq=&aqi=g-sx1g1[/url] Why you don't want to do that with a trigger: … | |
Re: [icode]IsNumeric()[/icode] should do the trick: [code=sql] IF OBJECT_ID('tempdb..#Test', 'U') IS NOT NULL DROP TABLE #Test Create Table #Test ( Value varchar(10) ) Insert Into #Test (Value) Values ('a') Insert Into #Test (Value) Values ('1') Insert Into #Test (Value) Values ('ab') Insert Into #Test (Value) Values ('a2') Insert Into #Test (Value) … | |
Re: That isn't corruption -- that is just a set of bad mirrors. Remove that mirror from /etc/apt/sources.list | |
Re: do: [icode]ls -al /home/user/.bash_profile[/icode] and paste the contents back here. It looks like your permissions are screwed up. [code] sk:~# cd ~test8 sk:/home/free/test8# chown root:root .bash_profile sk:/home/free/test8# chmod 700 .bash_profile sk:/home/free/test8# su - test8 -su: /home/free/test8/.bash_profile: Permission denied test8@sk:~$ logout sk:/home/free/test8# id test8 uid=1053(test8) gid=1004(free) groups=1004(free) sk:/home/free/test8# chown test8:free .bash_profile … | |
Re: You only add COM exposed libraries or managed libraries as a project reference. For other types of libraries you manually import the functionality of the lib (which it sounds like you need to in this case). Here is how you would call ShellExecute() from shell32.dll in %WINDIR%\system32\shell32.dll without adding a … | |
Re: I often create business entity objects, such as an Invoice, and then i use [icode]List<Invoice>[/icode] to have a list of invoices... such as the sales for that day. There you are using the generic List<of Type T>. | |
Re: [code] Select GetDate() --2009-09-17 16:47:34.720 Select DatePart(dw, GetDate()) --5 Select DateName(dw, GetDate()) --Thursday [/code] | |
Re: You mean issue an update query to the database? [code=sql] Update Table set Field= <textbox.Text> [/code] Please don't private message about a thread. I will read it. | |
Re: Can you upload a project? I have no idea what you're talking about. | |
Re: You can also set the password property in your .aspx markup: [code] <asp:TextBox ID="TextBoxPassword" runat="server" TabIndex="2" Width="200px" CssClass="inputBox" [COLOR="Red"]TextMode="Password"[/COLOR]></asp:TextBox> [/code] | |
Re: The image list enforces the image size for the images in the collection with [icode]imageList.ImageSize[/icode]. Is that what you were referring to? | |
Re: Try this approach: [code=sql] --No payment in last 90 days Select * From Invoice Where NOT EXISTS ( Select * From InvPayment (NOLOCK) Where Invoice.InvNumber = InvPayment.InvNumber and InvPayment.PayDate >= GetDate()- 90 ) --Has a payement in the last 90 days Select * From Invoice Where EXISTS ( Select * … | |
Re: You should also consider wrapping your SqlCommand, SqlConnection, etc members in a [icode]using()[/icode] clause to ensure IDisposable.Dispose() is called. These data accessors use unmanaged resources so you should ensure that clean up takes place as soon as possible. Please mark this thread as solved since TomW did an excellent job … | |
Re: Date formatting issues -- which is why you should use parameterized queries so this won't be a problem. Here is an example of SQL Server but you can change the class names over to OleDb: [code=vb.net] SqlCommand command = connection.CreateCommand(); command.CommandText = "SELECT * FROM Customers WHERE CustomerID = @CustomerID"; … | |
Re: Drop a datagridview on a form and try this: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb.dgv { public partial class frmDataGridView5 : Form { private DataTable dt; private DGVColumnHeader colHead; private bool suspendEvents; public frmDataGridView5() { InitializeComponent(); } … | |
Re: Also post the code you are using to fetch the RSS feed. Somewhere along the way you may be missing an opportunity to specify the proper encoding. | |
Re: I think this is what you want? [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmFindForm : Form { public frmFindForm() { InitializeComponent(); } private static Form FindOpenForm(Type typ) { for (int i1 = 0; … | |
Re: If you're controlling the site but they control the domain, why don't you have them set up a DNS entry for [url]www.domain.com[/url] to your server and host the domain that way? Doing what you're talking about can work but it will be a nightmare to support. | |
Re: From what I know you can't set drag & drop for a picture box, but you can set it for the form: [url]http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/360629bb-633c-4eeb-92a4-0af75de893fd[/url] | |
Re: Can you post your table structures and paste the error message from the SQL Server? Please use code tags when pasting: [noparse] [code] ...code here... [/code] [/noparse] | |
Re: It also depends on how much activity goes on in the database. You need to elaborate on your project a little more. | |
I tried to update my profile picture and I deleted the old one but now I get an error "Unable to save image" when trying to upload a new picture | |
Re: Same here. Maybe I will be able to use my iPhone on DW now :) | |
Re: You're trying to do too much without integrating natively with Excel or using COM. You can use vba automation or have an application control the Excel instance but i'm afraid the way you're trying to go about this isn't safe and will likely lead to data loss. |
The End.