2,245 Posted Topics
Re: Yes... use FindComponent() to find all TButton's except for the two static buttons you want to remain. Free the buttons and remove them from the control collection. If you don't know the name then search through Self.Components on the form and be sure to check the component collection of controls … | |
Re: Static constructors allow you to initialize [static] members in a static class when the class is referenced. A very detailed article has been posted at: [url]http://www.c-sharpcorner.com/UploadFile/cupadhyay/StaticConstructors11092005061428AM/StaticConstructors.aspx[/url] The example provided is: [code=c#] using System; namespace Constructor { class Test1 { private static int id ; //Static constructor, value of data member … | |
Re: That depends on how you have the code written. It should output to the browser if you are running on the same machine as the IIS server, if not you can catch the exception and log it to the windows event log. | |
Re: The page counter is probably an embedded link or javascript. It depends on the page counter but you will likely need to do another get with the referring URL of your site. What hit counter are you using? | |
Re: You're burning up the forum with general questions. Are you in college? ;) Check this article out: [url]http://blogs.msdn.com/shawnfa/archive/2004/03/17/91575.aspx[/url] An excerpt from it that sums it up: Delay Signing Most people know about the delay signing feature of the CLR. (For those who don't check out MSDN's Delay Signing an Assembly … | |
Re: To be honest I think you need to finish with threads you have started before you expect more help ([url]http://www.daniweb.com/forums/thread196736.html[/url]). The same advice I gave you in the previous thread about staying away from IDs will also fix your problem here. Think about what VS is doing in the core … | |
Re: In some cases it can be accessed through its IP address but not its host name, but I don't see how that factors in to file extension blocking. As far as I know the extension based downloading does deep packet inspection on the HTTP header and looks at the file … | |
Re: Use wireshark to packet sniff the connection. It can reassemble tcp conversations and look for a redirect or meta refresh with https:// | |
Re: This doesn't start a new game properly, and has a few other issues but it should get you started. I didn't know if you wanted to disable the button, close the app, etc. [code=c#] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; … | |
Re: First off I think this is a bad idea and it is going to cause problems down the road. Are you trying to assign the id as "current" so you can find the currently selected list item in a content page, or so you can do custom CSS formatting? If … | |
Re: [code=c#] private void listBox1_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); e.Graphics.DrawString( listBox1.Items[e.Index].ToString(), e.Font, Brushes.Red, e.Bounds, StringFormat.GenericDefault); } [/code] [code=c#] this.listBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.listBox1.FormattingEnabled = true; this.listBox1.Items.AddRange(new object[] { "Item 1", "Item 1", "Item 1", "Item 1"}); this.listBox1.Location = new System.Drawing.Point(90, 243); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(120, 95); this.listBox1.TabIndex = … | |
Re: You're better off approaching this by writing out an XML file to disk in a directory, then processing the directory and deleting the files if the network send fails. This way you will always have the same command life cycle of generate command -> write to disk -> read from … | |
Re: [QUOTE=ddanbe;887383]s="hello,\n+ I am \n+"fine\n: WHAT is that?!?? I think you mean something like : string s = "hello,\n" + "I am \n" + "fine\n"; Use the Split function to accomplish what you want.[/QUOTE] Usually a new line is "\r\n" so you will want to do what ddanbe said and use … | |
Re: I'm assuming you mean a compile time error and not a runtime error? That would be because you are not terminating or escaping your string properly. Try this: [code=c#] System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = "bcp"; proc.StartInfo.Arguments = @"select * from dbname"" queryout C:\filename.csv -S servername\instance -U sa -P … | |
Re: Yes but you are getting in to more abstract CS theory than actual implementation of Interfaces in the .NET framework which the post inquired about. Interfaces add a signature to the class but are not required as your original post indicated. Static classes cannot descend from a base class nor … | |
Re: Load it up in to a generic string collection: [code=c#] private void simpleButton1_Click(object sender, EventArgs e) { const string fileName = @"C:\File.txt"; List<string> lines = new List<string>(); lines.AddRange(File.ReadAllLines(fileName)); Console.WriteLine(lines.Count); } [/code] | |
Re: Your question doesn't make sense but based on the sample code I assume you want to show one message box with all of the processes? If that is the case call ShowProcessesGroup(); as shown below. ShowProcessesIndividually() is functionally identical to the code you posted. [code=c#] private static void ShowProcessesIndividually() { … | |
Re: First off the most appropriate language is often a matter of preference so I wouldn't think there would be a correct answer to this. For compatibility reasons I would think C would be the way to go. Secondly md5 is not encryption, it is a hash value. The .NET framework … | |
Re: You probably need to specify the allowed hosts for recursion. [code] allow-recursion { 192.168.56.0/24; } [/code] You should be able to do this globally in the bind configuration, or you can set it per specific zone. | |
Re: It sounds like you added a deployment project to a solution but not the application itself. In the "View -- File System" under the "Application Folder" option you need to right click and "Add -- Project Output" and select "Primary Output" (you should do this in a directory you created … | |
Re: Value in that sense is a special keyword that represents the data type of the property being set. [code=c#] public string Property123 { get { return _property123; } set { _property123 = value; } } [/code] In that sense "value" looks to the property where the value is being set … | |
Re: Windows XP SP2 imposed a TCP connection limit. Check your windows event log: Start -- Run -- eventvwr.msc -- to see if this is your problem. You can increase or remove the limit: [url]http://www.speedguide.net/read_articles.php?id=1497[/url] If this is not your problem then something is likely throttling your TCP SYN packets (new … | |
Re: Let me ask for clarification. You have a switch connecting your LAN and one of the devices hooked up to the switch is a router, correct? Or are we talking about a switch/router combination unit. | |
Re: You can go about this two ways. You can mark the interface implementation in the abstract class as virtual and override it in descending classes: [code=c#] namespace daniweb { interface IDoWork { void DoWork(); } public abstract class ClassB : IDoWork { #region A Members public virtual void DoWork() { … | |
Re: Or next door to me so I can keep an eye on the competition ;) | |
Re: I'm more of a C# guy than VB so you'll have to do the coding on your end but: [code=vb] Dim unitCost As Decimal = CDec(CType(DetailsView1.FindControl("Label4"), Label).Text) [/code] This likely means this section of the code is failing: [code=vb] DetailsView1.FindControl("Label4") [/code] Try something like: [code=vb] Dim aLabel As Label = … | |
Re: Time to turn to FOSS: [url]http://www.google.com/search?hl=en&q=.net+charting+free[/url] There is a lot involved in creating a chart.... | |
Re: The raw SQL for doing this task is: [code=sql] USE [master] GO ALTER LOGIN [myUser] WITH DEFAULT_DATABASE=[myDB], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON, NO CREDENTIAL GO USE [myDB] GO CREATE USER [myUser] FOR LOGIN [myUser] GO USE [myDB] GO ALTER USER [myUser] WITH DEFAULT_SCHEMA=[mySchema] GO USE [myDB] GO EXEC sp_addrolemember N'db_owner', N'myUser' GO … | |
Re: That is a little more complicated than it seems. You can fire up the SQL Profile and monitor the database to see the raw TSQL being executed, but that is not the whole picture. If a table has a trigger on it, say to log the values changed in to … | |
Re: These are the instructions for SQL 2005, i'm sure it is similar for other versions but you may need to check. Open up the table in the designer and make the changes you want --- but don't apply them. On the top menu you will see "Table Designer" (to the … | |
Re: Just a guess but i'll bet you are using windows authentication in your connection string? When running an ASP.NET site on a production webserver the user is that of the ASP.NET service, IIUSER_ASP_NET or something like that.. but it typically has no rights. Try using sql user/pass with a user … | |
Re: You should link in your other thread for future questions on this project to give people a good background on what you're doing without having to retype it all :) Take a look at what HTTP, FTP, or many other protocols do. They assign numeric values for a command and … | |
Re: In order to Insert Into with a subquery you cannot use Values(), you must use select. Here is an example: [code=sql] --Getting a test environment set up..... IF OBJECT_ID('Users', 'U') IS NOT NULL DROP TABLE Users Create Table Users ( UserId int PRIMARY KEY, UserName varchar(100) ) IF OBJECT_ID('Comment', 'U') … | |
Re: Don't build queries dynamically like that, is it dangerous and hurts performance. You do not need to instantiate a new SqlDateTime(otherDateTime), just set the parameter to the CLR DateTime and let the data drivers map it for you. [code] private void simpleButton1_Click(object sender, EventArgs e) { const string query = … | |
Re: That doesn't make any sense. All of the redirections are done client side. The server sends an HTTP 301/302, uses a meta refresh, or various other methods to redirect. Unfortunately for you the HTTPWebRequest doesn't respect all redirections that a browser might as it is not script-aware, it will fetch … | |
Re: [code] SqlDataSource1.UpdateParameters["Adresa"].DefaultValue = NovaAdresaTextBox.Text; [/code] That code is setting the default value used in the update queries' parameters. SqlDataSource should expose a View for the table in question. I don't use SqlDataSource but look around, you should be able to: [code] SqlDataSource["TableName"][rowIndex].Field = value; SqlDataSource["TableName"].Save(); [/code] If you hadn't had … | |
Re: If it is a single image that never changes such as a company logo then insert HTML in the designer file [code=html] <img src="/images/image.png" alt="my company" height="50" width="50" /> [/code] If you want an ASP image then open up the page in VS designer and go to the split or … | |
Re: You should probably recreate the RSS .xml file from the database after you do any inserts, updates, or deletes to the SQL table. It is too error prone to try "add here, and, add here" .. then "update here, and, update here" .. over time they will get desynched. If … | |
Re: [code] private void simpleButton2_Click(object sender, EventArgs e) { const string query = @"CREATE LOGIN [<domainName>\<loginName>] FROM WINDOWS;"; const string connStr = @"Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;"; using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.ExecuteNonQuery(); } conn.Close(); } } [/code] | |
Re: You should be able to right click on the SQL Table Adapter in the designer and add a new Fill query, FillByUserId(@UserId) which will define the parameter for you. | |
Re: Are you wanting simply to read the data out of the Excel worksheet like a database, or are you making a front-end spreadsheet wrapper? If you want to automate Excel then you're taking the right approach, if you're wanting to read data like a database then I would have a … | |
Re: Take a look at the BackgroundWorker class, it probably best matches what java calls an Observer. It handles the thread creation for you and the ReportsProgress will .Invoke() so you can update the UI, its pretty handle for simple updates. [url]http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[/url] [url]http://dotnetperls.com/Content/BackgroundWorker-Introduction.aspx[/url] | |
Re: On the client side your best bet would be a synchronous socket, as you suggested. TCP is a stateful protocol so you can't very well send two packets at the same time on the same connection, you need to send one then the next. If it were UDP then you … | |
Re: Are you after a combobox that basically has two columns in it, such as a first and last name on one row in 2 columns? | |
Re: Most likely you're running in to a schema issue based on how you are authenticating with the PostgreSQL. Keep in mind by default the ASP.NET account runs as an unprivileged user, IUSER_ASP_NET or something like that... and if you're doing any kind of LDAP authentication with the server you won't … | |
Re: The problem is you're not closing the connection. You're returning a data reader which requires an open connection to read the data. You need to declare a DataTable and use dt.Fill(rs); [code] Private Function _getRS(ByVal strSql As String) As System.Data.SqlClient.SqlDataReader Dim conn As New System.Data.SqlClient.SqlConnection(strSQLconn) Dim cmd As New System.Data.SqlClient.SqlCommand(strSql, … | |
Re: That depends a lot on the type of image, but as a general statement you don't get a very good compression ratio on images when zipping. I'm assuming you mean ZIP because you say decompress after downloading. Unfortunately if you want to retain a large image at the same quality, … | |
Re: I'm guessing that means you have two tables? Please post an actual schema if not. [code] Select Owner.Id, Sum(Product.Qty) As Qty From Owner inner join product on (owner.id=product.owner_id) Group By Owner.Id Order By Owner.Id [/code] |
The End.