Groups | Blog | Home


Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > c# > march 2005 > threads for monday march 28

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Profiling my code
Posted by AdamM at 3/28/2005 11:59:03 PM
What tool can I use to see where my C# code is spending most of it's cycles for the purpose of optimizing it? Thanks in advance! ...more >>


XmlRootAttribute issue
Posted by John Lee at 3/28/2005 11:14:21 PM
Hi, I created a strong-typed (Class1) collection class for my web service, it actually serialized to <ArrayOfClass1 /> and I need to make the root named as <Class1Collection /> so I was trying to add an XmlRootAttribute but I always got error message when I tried to serialize this collectio...more >>

.Net controls in C#.
Posted by Radhakrishna Banavalikar at 3/28/2005 10:29:01 PM
Hi Geeks, Can anyone suggest me an exhaustive tutorial/free e-book/forum on creating real-time graphing components in C#? The component should accept data from serial port (using API functions/events) & plot the same in real-time. -- Radhakrishna Banavalikar Vasant-Vihar, Thane, INDIA....more >>

How to show a datetime field in a TextBox
Posted by ad at 3/28/2005 9:56:53 PM
I have a datetime filed, name Birthday. I use aTexBox.Text= ((DateTime)dr["Birthday"]).ToShortDateString(); but it result in an .InvalidCastException: How can I datetime field in a TextBox? ...more >>

(string)dr["FieldName"] vs dr["FieldName"].ToString();
Posted by ad at 3/28/2005 9:52:46 PM
Hi, What is the difference between (string)dr["FieldName"] and dr["FieldName"].ToString(); ...more >>

Why can't I transfer non-english letters over my network connectio
Posted by Joachim at 3/28/2005 8:49:02 PM
I'm using the following to transfer the content of two strings containing non-english letters byte[] responseB = Encoding.ASCII.GetBytes(responseHdr.ToString() + responseBody.ToString()); But when I receive it, the non-english letters have been replaced by question marks (?). What could ...more >>

Another ComboBox data source gotcha
Posted by web1110 at 3/28/2005 8:44:03 PM
Here's another one. The code is below. If I display to the ListBox, I get the exception: Could not bind to the new display member, Parameter name: newDisplayMember and all ListBox members are set to MtProg.Form1.USState If I comment out the listBox1 lines, leaving the comboBox1 line...more >>

ComboBox Binding
Posted by web1110 at 3/28/2005 7:33:06 PM
Hi y'all, I tried to bind a one column table to a ComboBox and got this error: "Complex DataBinding accepts as a data source either an ILIST or an ILISTSOURCE" The code is: DataSet dataSet1; DataTable dataTable1 = new DataTable("LastNames"); dataTable1.Columns.Add(new DataColumn("L...more >>



Asp.NET javascript function postback problem
Posted by Viktor Popov at 3/28/2005 7:17:34 PM
I have a javascript functions which are used for populating 2 select boxes. The first select box is used for continent names, the second for the countries in the contint. When I click on a continent, in the second select box, are shown the countries. Everything works well accept one thing. When I...more >>

Delegates and EventHandlers
Posted by Robert at 3/28/2005 6:49:03 PM
I need some assistance doing some "right way to do it" coding. The following are EventHandlers associated with Delegates in a child form that call a procedure in the MDI form that resets a timer. There must be a better way to code this than calling OnResetTimer in all these procedures separ...more >>

GetPrivateProfileString
Posted by L at 3/28/2005 6:32:19 PM
[DllImport("kernel32.dll")] static extern uint GetPrivateProfileString( string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, uint nSize, string lpFileName); Interoping GetPrivateProfileString is giving me this Exception in certain cas...more >>

possible to execute code contained in a string ?
Posted by John Grandy at 3/28/2005 4:52:10 PM
Is there any way in C# to mimic the T-SQL EXEC() command (which runs a string as if it was in-line T-SQL code) ? ...more >>

inheriting from a class with constructors
Posted by G. Purby at 3/28/2005 4:17:03 PM
What is the proper way of defining a class that inherits from a base class that has no constructor with 0 arguments? The following code generates compiler error CS1501, "No overload for method 'BaseClass' takes '0' arguments". class BaseClass { public BaseClass(double x) { ...more >>

TcpClient performance issue
Posted by Jimbo at 3/28/2005 4:01:51 PM
Hi People, I have the following bit of code: Console.WriteLine(DateTime.Now.ToString()); TcpClient tcp = new TcpClient(server, port); Console.WriteLine(DateTime.Now.ToString()); When "server" is an IP address it takes approximately 5 seconds while Windows works out if there is a Netbios...more >>

Identifying class properties at runtime?
Posted by AdamM at 3/28/2005 3:51:39 PM
At runtime, how do you take a user-supplied string, and then match that up with a class property name? For example, I have a User class with the property User.Name. At runtime, I want the user to type 'set user.name=adam' and the code checks the user class instance for the property name pro...more >>

setting security from code
Posted by Danko Greiner at 3/28/2005 3:44:57 PM
Thanx Willy, this was very helpful. But i also need (and want to know) how to do this from code. Can you plase give me right topic in MSDN? is there good example? Thanx p.s. this is copy/paste from previous thread, don't ask why... "Grei" <danko.greinerREMOVE@zg.htnet.hr> wrote in messag...more >>

Escape Characters
Posted by Rowan at 3/28/2005 3:31:05 PM
I have just started doing some exercises in C# and have a question about carriage return and new line escape characters. The code is concatenating the text values from two textboxes and both the \r (carriage return) and \n (new line) escape characters are used between the two strings. Could yo...more >>

Question about Sockets
Posted by Bernd at 3/28/2005 3:13:49 PM
hi, is it possible to use a Socket (proto_udp) and recieve icmp messages ? what i want to do is, send a datagram to a remote host/port and check if the host replies with port_unreachable (i think icmp type 3). is this possible with a udp Socket and the RecieveFrom() method ?. another approach...more >>

How to call ASP page from C# application?
Posted by Julia at 3/28/2005 2:18:47 PM
I am looking for something similar to Microsoft.XMLHTTP in .NET I am just need to synchronously call an ASP page,pass it some parametrs and accept true or false string as a response Thanks ...more >>

Format Strings
Posted by Nathan Wiegman at 3/28/2005 1:33:02 PM
Hi, Anyone know why "s" equals "0.0870000000000000000000" after the following lines execute? Thanks, Nate double d = 0.087000000000000008; string s = string.Format("{0:f22}", d);...more >>

Posting data using HttpWebRequest
Posted by Beenish Sahar Khan at 3/28/2005 12:50:15 PM
I am using the following piece of code to post some data to a web form, req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength =formcontents.Length; sendStream = req.GetRequestStream(); sendStream.Write(formcontents, 0, formcontents.Length); ...more >>

Apache webserver (Java WebService) and C#
Posted by Daniel Santana at 3/28/2005 12:21:02 PM
Hi again. Now I got a brand new problem using the java webservice. I'm trying to use the wsdl tool of the "Microsoft Visual Studio .Net 2003 Command Prompt"... but I got the same message when trying to add web reference in visual studio. Now, the message displayed is the following: "The...more >>

ComboBox find item based on value
Posted by nickyw at 3/28/2005 11:34:02 AM
Hi, Can anyone help, I want to get a reference to a combobox item based on the item's value rather than the text (basically what I am asking is, is there a function like 'FindStringExact' for values) , does anyone know how to do this? Thanks, Nicky ...more >>

Insert null values in MS SQL Sever 2000
Posted by Rodrigo C. Souza at 3/28/2005 11:11:03 AM
I need to insert a null value in a table on MS SQL Server 2000 using a stored procedure. When I send no data to the stored procedure, I get an error saying that the value cannot be null, but I did the table to receive null values. I tried DBNull.Value but didn't work. Thanks, Rodrigo....more >>

VB to C#
Posted by Newbie at 3/28/2005 10:47:08 AM
Hi! I need to convert from VB ASP to C# ASP.NET. // the following code is already converted. ' Create recordset and query Set rsCHI = Server.CreateObject("ADODB.Recordset") sCHI = "SELECT ..... ' Open recordset and run query rsCHI.Open sCHI,db,,,adCmdText // the code b...more >>

how to get minimum width of a column in a DBGrid
Posted by Wilfried Mestdagh at 3/28/2005 10:33:04 AM
Hi, If you doubleclick on a dbgrid title separator the column automticly resize to his minumum width. How to do this in code ? -- rgds, Wilfried http://www.mestdagh.biz...more >>

Throwing exception in a try block?
Posted by Kevin Yu at 3/28/2005 10:27:02 AM
is it a bad programming design to throw exception in the try block then catch it?? ...more >>

MyApp.exe.config and App.config
Posted by Craig at 3/28/2005 10:23:02 AM
In development for a windows app, is it proper to manipulate and keep versions of the MyApp.exe.config or just the App.config file? ...more >>

Problem with deriving System.EventArgs
Posted by Michael Moreno at 3/28/2005 9:40:46 AM
Hello, I am failing to understand why I get an invalid cast exception with this very simple code. I have derived the EventArgs class as follow: public class StringArgs : System.EventArgs { public string Msg; public StringArgs(string aMsg) { Msg = aMsg; } } and I fire the...more >>

System.Threading.Timers question
Posted by Deiussum at 3/28/2005 9:22:58 AM
I'm running into an issue where I have a timer that appears to be timing out immediately, when it shouldn't be timing out for about int.MaxValue milliseconds. I have written a small app that isolates the problem and was wondering if anyone had any ideas on what I am doing wrong, or if there...more >>

Convetting string/text to datetime
Posted by Randel Bjorkquist at 3/28/2005 8:24:38 AM
I'm extremely new to C# and the Microsoft Visual Studio IDE. I'm writing a small web-application that executes a SQL Server stored procedure. For the most part, I have it working. I am at the point where I now just need to pass two more fields to the stored procedure, they are both to be da...more >>

Exception before event handler is triggered
Posted by Joachim at 3/28/2005 7:37:07 AM
Why do I get the exception An unhandled exception of type 'System.NullReferenceException' occurred in system.dll Additional information: Object reference not set to an instance of an object. before even getting to the first line of the event handler for my radio button? I guess that...more >>

ASP.NET Problem
Posted by bernardpace NO[at]SPAM yahoo.com at 3/28/2005 7:23:05 AM
Hi, I have the following piece of code. In reality it is a menu which has more options. The main idea was taken from the following link. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_fp2003_ta/html/OfficeFrontPageCreateDropDownMenu.asp <table class="navbar" width=...more >>

VB to C#
Posted by Newbie at 3/28/2005 7:09:03 AM
Hi! I need to convert the select statement below from VB ASP to C# ASP.NET. Pls. help and thanks in advance. ' Create recordset and query Set rsCHI = Server.CreateObject("ADODB.Recordset") sCHI = "SELECT a.cust_des1, a.des1 projectName, b.job_no JobNo, b.des1 jobName, b.contract_amt,...more >>

C# as IE Control
Posted by CSharpNewbie at 3/28/2005 7:08:18 AM
is it possible to use c# windows controls the same way as VB Activex Controls in IE pages? We did something like: <OBJECT ID="MyControl" NAME="MyControl" CLASSID="clsid:FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"> </OBJECT> i'd rather use windows controls than web controls because we may also...more >>

TollBox Pushpin effect
Posted by Wayne at 3/28/2005 6:58:19 AM
I would like to have the flyout/pushpin affect in an application I'm developing. Am I missing something, or is there no standard control for doing this in VS.net 2003? -- Thanks Wayne Sepega Jacksonville, Fl "When a man sits with a pretty girl for an hour, it seems like a minute. But ...more >>

String vs string
Posted by Robert at 3/28/2005 6:11:03 AM
I am curious about declaring strings in C#. I see strings declared like: string mystring = "something"; I also see: String mystring = "something"; What is the difference? -- Robert Hill ...more >>

Where are things cached?
Posted by Joachim at 3/28/2005 5:21:02 AM
I have a tray icon which I have changed. However, I have deleted lots of cache things but still I have the old icon in the system tray. How can I make my new version of the icon appear in the system tray? Where is the cache that I have to delete to make it work?...more >>

Why exception when going through the DataSet?
Posted by Joachim at 3/28/2005 3:57:02 AM
When executing the following code ArrayList list = new ArrayList(); try { //Make sure connection is open if (!connection.State.ToString().Equals("Open")) connection.Open(); DataSet list = new DataSet(); SqlDataAdapter da = new SqlDataAdapter("select " + m_TableSerieColName + " ...more >>

multiple connections
Posted by Radu.Micu NO[at]SPAM gmail.com at 3/28/2005 3:21:42 AM
What is the best way to work with multiple db connections? I mean that I ahave an app with a TreeView on it and for each node(if he has some props)I want to use a diffrent db (MsAccess) connection, what i did is that when I press a node I verify the conditions and if they are OK I [] conn=new Ol...more >>

generating Dataset with Visual Stuio Wizards?
Posted by xxxxyz NO[at]SPAM abv.bg at 3/28/2005 12:23:51 AM
Hi, I want to generate dataset class using Visual studio ( I can do this as first generate SqlDataAdaptor and SqlConnection). But can I ganerate it without sqldataadaptor and sqlconnection, because I want to create SqlConnection at runtime(may be i have to delete them after generating the datas...more >>

VSnet C# CDO sample code?
Posted by g_sharad NO[at]SPAM yahoo.com at 3/28/2005 12:10:17 AM
Hi, Iam currently using asp for sending the newsletter to the subscribers of my website. The list is stored in database. But there are a lot of problem tht I am facing So i was thinking to shift teh code to asp.net in c#. But not able to find a proper code for this.... can anyone help me i...more >>

sharing form data
Posted by David Sobey at 3/28/2005 12:00:00 AM
i'm trying to access the values of a set of controls on one form from another form. how do i do this without breaking the .NET convention of not declaring visible instance fields? do i have to make and assign properties for each control? cheers dave ...more >>

How to cast string to integer
Posted by ad at 3/28/2005 12:00:00 AM
I have a string like string sAge="13"; How Can I cast sAge to a integer? ...more >>


DevelopmentNow Blog