2,245 Posted Topics

Member Avatar for CTBC

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 …

Member Avatar for sknake
0
166
Member Avatar for sivak

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 …

Member Avatar for kvprajapati
0
82
Member Avatar for sivak

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.

Member Avatar for sknake
0
41
Member Avatar for DevC++4.9.9.2

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?

Member Avatar for DevC++4.9.9.2
0
246
Member Avatar for sivak

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 …

Member Avatar for sknake
0
133
Member Avatar for kkemerait

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 …

Member Avatar for sknake
0
87
Member Avatar for threat

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 …

Member Avatar for sknake
0
92
Member Avatar for a496761

Use wireshark to packet sniff the connection. It can reassemble tcp conversations and look for a redirect or meta refresh with https://

Member Avatar for sknake
0
153
Member Avatar for tintincute

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; …

Member Avatar for tintincute
0
118
Member Avatar for kkemerait

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 …

Member Avatar for sknake
0
253
Member Avatar for serkan sendur

[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 = …

Member Avatar for serkan sendur
0
2K
Member Avatar for jonnytabpni

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 …

Member Avatar for jonnytabpni
0
115
Member Avatar for sivak

[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 …

Member Avatar for sknake
0
71
Member Avatar for aceswildab1

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 …

Member Avatar for sknake
0
2K
Member Avatar for sivak

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 …

Member Avatar for serkan sendur
0
120
Member Avatar for serkan sendur

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]

Member Avatar for Mortu
0
176
Member Avatar for purpleCRAYON

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() { …

Member Avatar for sknake
0
96
Member Avatar for Chris1971

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 …

Member Avatar for sknake
0
50
Member Avatar for dddexter

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.

Member Avatar for sknake
0
948
Member Avatar for jineesh

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 …

Member Avatar for serkan sendur
0
171
Member Avatar for pickspick

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 …

Member Avatar for serkan sendur
0
60
Member Avatar for nschessnerd

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 …

Member Avatar for nschessnerd
0
144
Member Avatar for paritycheck

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.

Member Avatar for sknake
0
104
Member Avatar for FallenPaladin

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() { …

Member Avatar for sknake
0
301
Member Avatar for ChristineB
Member Avatar for jforward5

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 = …

Member Avatar for sknake
0
134
Member Avatar for dip7

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....

Member Avatar for Diamonddrake
0
136
Member Avatar for SANMI
Member Avatar for sachintha81

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 …

Member Avatar for sachintha81
0
393
Member Avatar for rohithmishra

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 …

Member Avatar for Ramy Mahrous
0
137
Member Avatar for Kusno

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 …

Member Avatar for Kusno
0
130
Member Avatar for ibrahim_sh_87

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 …

Member Avatar for sknake
0
94
Member Avatar for Bhoot

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 …

Member Avatar for Bhoot
0
138
Member Avatar for blozzy

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') …

Member Avatar for sknake
0
132
Member Avatar for finnj6

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 = …

Member Avatar for finnj6
0
467
Member Avatar for Potato.Head

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 …

Member Avatar for sknake
0
172
Member Avatar for robertmacedonia

[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 …

Member Avatar for sknake
0
135
Member Avatar for engnr

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 …

Member Avatar for sknake
0
82
Member Avatar for konczuras

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 …

Member Avatar for sknake
0
83
Member Avatar for sachintha81

[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]

Member Avatar for sknake
0
145
Member Avatar for shawn.bordeaux

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.

Member Avatar for shawn.bordeaux
0
185
Member Avatar for Tank50

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 …

Member Avatar for Ramy Mahrous
0
128
Member Avatar for sivak

Wrong forum, Move this over the MSSQL forum: [url]http://www.daniweb.com/forums/forum127.html[/url] Read [url]http://www.devarticles.com/c/a/SQL-Server/Using-Triggers-In-MS-SQL-Server/[/url] for additional information

Member Avatar for Ramy Mahrous
0
91
Member Avatar for functionalCode

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]

Member Avatar for functionalCode
0
93
Member Avatar for Bhoot

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 …

Member Avatar for Bhoot
0
642
Member Avatar for MJV

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?

Member Avatar for kvprajapati
0
66
Member Avatar for jimib

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 …

Member Avatar for jimib
0
113
Member Avatar for agrothe

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, …

Member Avatar for agrothe
1
544
Member Avatar for kals4u

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, …

Member Avatar for sknake
0
68
Member Avatar for brixton

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]

Member Avatar for brixton
0
107

The End.