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# > february 2008 > threads for monday february 25

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

Creating select column list dynamically in DLinq
Posted by Andrus at 2/25/2008 10:18:53 PM
How to create select columns list dynamically in DLinq ? I want to create something like Console.WriteLine("Enter list of columns to return, separated by commas:"); string list = Console.ReadLine(); var q = from c in Db.Customers where c.Location=="London" select list...more >>


access web.config from another dll
Posted by Tem at 2/25/2008 9:45:40 PM
my DAL is in a separate dll/project than the website project. how would I go about accessing/referencing a connectstring in the web.config file in the website project ? so I don't have to hard code the connect string in the code file of the DAL dll. Tem ...more >>

LINQ: Designing DB relations
Posted by K Viltersten at 2/25/2008 9:31:32 PM
I've got me a database and after i've D&D'ed two tables onto DBML i discovered that i could define a relation between them, making the one a parent and the other a child. I noticed that the primary key in the parent is a column in the child. I guess it makes it a foreign key in the other ta...more >>

Remoting - Detect a crashed/disconnected client from the server?
Posted by JamesB at 2/25/2008 8:59:17 PM
OK, after lots of faffing I have finally gotten remoting working - basically I have a windows service (the "server") and a forms app (the "client"). The forms app can call methods in the server, and I can get events fired on the server to be picked up and acted on in the client app, so all is...more >>

Why we should use delegate?
Posted by Swapnil at 2/25/2008 8:22:00 PM
As we know we can call function from the class by using object of the class where that function is present. Then what is new in delegate it also calls the function but the difference is that we are providing wrapper around the function call. iI know it is typesafe. Explain with some strong c...more >>

Fingerprint ActiveX
Posted by Mario_Cerón_Charry at 2/25/2008 8:09:52 PM
i'm building a web app for capture fingerprints with a suprema SFR300 sensor. The sdk is not an activex, is a dll and wrappers in .NET for access dll. I need to build an activex that enable the capture in an aspx page. Where can i find information about it or how can i do this? Thanks a lot...more >>

Do I need to use GroupBox to separate groups of radio buttons on Win form?
Posted by Ronald S. Cook at 2/25/2008 7:58:49 PM
Do multiple sets of radio buttons on a form have to be "separated" via group boxes? I remember there used to be a "group" property on radio buttons but I guess not anymore. I just don't really want to use a GroupBox control if I don't have to (although I could make it's border color the ...more >>

Will this work? Trying to show relational data in a GridView
Posted by DanThMan at 2/25/2008 7:11:59 PM
Hi All, Here's how my data looks. Two tables. The first has all the data in "expanded" form, the second has just "ID" data in "pivoted" form. Here's the "expanded" table: DataID | RowID | ColumnID | Label | Color --------------------------------------------- 1 | 1 | 1 | Warning | Red 2 ...more >>



compiler error
Posted by CJ at 2/25/2008 7:06:02 PM
Can someone tell me what this error means and how to get rid of it. ADODB.Stream adodbstream = new ADODB.Stream(); adodbstream.Type = ADODB.StreamTypeEnum.adTypeText; adodbstream.Charset = "US-ASCII"; adodbstream.Open(); Error 1 No overload for ...more >>

Email parser to Database
Posted by jaydev at 2/25/2008 6:35:38 PM
Hi, I need to write an application to parse the incoming email and parse the fields and store the values in the database. Can anyone give me a direction to do this? Thanks for your help. Thanks, Jay...more >>

I Need a Name for a Method . . . Better than All-You-Can-Eat
Posted by jehugaleahsa@gmail.com at 2/25/2008 5:42:33 PM
Hello: I need a method that always returns the default value. It is similar to DefaultIfEmpty. public static IEnumerable<T> MyMethodName<T>() { while (true) { yield return default(T); } } Any ideas? Anything will do. Don't ask me why this is useful . . . it just ...more >>

GAC hell
Posted by Fredo at 2/25/2008 5:29:16 PM
I'm writing a wrapper for the VBScript and JScript engines in .NET. I'm trying to add a little uniformity where Microsoft has some divergence. With the JScript engine, you can add references and provide a path to where each DLL is. With the VBScript engine, you can't do that. For DLLs that ...more >>

Using transaction with multiple commands
Posted by tshad at 2/25/2008 5:12:22 PM
How do I use a "transaction" with multiple SqlCommands and one Sql Connection? For example if I have the following where I have 1 connection and then loop through multiple SqlCommands (multiple inserts to a variety of tables) where I want it to roll back if any of them fail: using (SqlCo...more >>

Get Fatal Error - 800040005
Posted by barbara_dave@yahoo.com at 2/25/2008 3:15:45 PM
Hi All, I developed a .net framework1.1 application and deployed with InstallShield Express 12. One customer got "fatal error 800040005" after installation. Any suggestions? Thanks!...more >>

LPT1 print from Windows Service
Posted by Gonçalo_Boléo at 2/25/2008 3:09:12 PM
Hi! I'm trying to develop a print mechanism each time a file is placed in a certain folder. I'm using a Windows Service and FileSystemWatcher class to implement this. Printing to LPT1 port is doing using unmanaged function CreateFile as described in MSDN. My code works fine in a console ...more >>

Using?
Posted by tshad at 2/25/2008 3:04:23 PM
Trying to figure out why to use "using". I am at a loss to see why this: using (SqlConnection connection = new SqlConnection(connectionString)) { SqlCommand command = connection.CreateCommand(); SqlTransaction transaction = null; try { // BeginTrans...more >>

Inefficient? but fun. :-)
Posted by jehugaleahsa@gmail.com at 2/25/2008 2:57:13 PM
public static IEnumerable<T> RotateLeft<T>(IEnumerable<T> collection) { using (IEnumerator<T> values = collection.GetEnumerator()) { if (values.MoveNext()) { T last = values.Current; ...more >>

Which .net features exactly are exposed through the language?
Posted by igivanovg@gmail.com at 2/25/2008 11:11:13 AM
Example: msdn says explicitly that enumerable/enumerators are exposed via foreach. It says so a thousand times everywhere. Ok. Now we have the Convert class and and its counterparts in the form of conversions expressed through special C# syntax. Nowhere could I find that the compiler translate...more >>

combobox.focus in a datagrid.
Posted by jereviscious at 2/25/2008 10:13:37 AM
Hi all I've added a combobox to the datagrid control using the following method dataGridTextBoxColumn7.TextBox.Controls.Add(comboControl); The problem is that when I tab to the Column that contains the combobox, the focus is on the underlying textbox in the datagrid. I've tried doi...more >>

Interface, classes and inheritance
Posted by Dansk at 2/25/2008 9:52:15 AM
Hi all, I've just found a strange (for me) family relationship with classes and interface. Here is a simple code sample : namespace Test { public interface IFoo { void Foo(); }; public class A { public void Foo() { } }; public class B : A, IFoo { }; } ...more >>

Hashing article title, will it always be unique?
Posted by DotNetNewbie at 2/25/2008 9:46:27 AM
Hi, I need to hash the Title of my articles, will the hashed value ALWAYS be unique so long as the Title is unique? Example: string title = "microsfoft csharp news group"; int hash = title.GetHashCode(); ...more >>

Console application checking if .NET installed
Posted by Brian Stoop at 2/25/2008 9:33:37 AM
If .NET is not installed my console application pops up "the application failed to initialize properly" dialog. Can I programatically tell if .NET is installed, and pre-emp this message with my own ? thanks ...more >>

difference between plugin pattern and factory pattern
Posted by DAXU at 2/25/2008 8:57:49 AM
Hi, I am bit confused about the differences between plugin pattern and factory pattern. Can someone explain the differences? Many Thanks Jerry...more >>

More Type/COM fun
Posted by oddball.bfi@gmail.com at 2/25/2008 8:55:35 AM
Ok - now I've got me stuck again - this time good and proper. I've got a Type object for an interface a COM object may (or may not) implement. Lets call it IBob Now IBob bobObject = comObject as IBob; if (bobObject == null) return "Don't call me Bob"; else return "Call me Bob! If y...more >>

How Do I Get A Handle To and Assembly Object???
Posted by E.D.I at 2/25/2008 8:14:44 AM
How Do I Get A Handle To and Assembly Object??? Actually i need to use Bitmap.FromResource() and i need to give it the name and a handle of the Assembly... Please Help!!!! Realy Realy Stuck.......more >>

about references and pointers
Posted by TonyJ at 2/25/2008 7:58:22 AM
Hello! You can write int[] vektor = new int[5]; This array will be stored on the heap and you will have a reference(vektor) to this array. As long as you keep a reference to this array will GC never remove this array. If you for example set vektor = null then you give the GC permission to ...more >>

Simple? Problem With Numeric Up/Down Control
Posted by joey.powell@topscene.com at 2/25/2008 7:56:57 AM
Hello guys. I have a Windows forms app where I need to use a couple of numeric up/down controls. I am having a problem with them because I cannot set the control to ReadOnly (I need for users to be able to use the keyboard) but when users highlight all of the text and hit backspace, all text is ...more >>

Problem with events
Posted by danger at 2/25/2008 7:33:48 AM
I everybody, first of all sorry for my poor english. I have a problem with an event that is generated more times very quickly so the function subscribed doesn't finish his work. What can i do in order to complete the work of the function before a new event is generated? I have choosen two option...more >>

Image verification
Posted by Mike P at 2/25/2008 7:12:28 AM
I am trying to generate an image on my login screen that the user must enter the characters of in order to login successfully. I have managed to find a method that returns a bitmap, but I am not sure how to render it to the page alongside the rest of the login page. Bitmap bmp = iv.generate...more >>

Using a List<> for storage
Posted by Hoop at 2/25/2008 6:38:19 AM
Hi, I have a project where I have to store what we call modules. To get the project going I have been using an array, however this will not be the best way as the items that will be stored are dynamic, might or might not be an instance of one. What I have is a abstract base class where I will c...more >>

Windows Service & Clipboard
Posted by Humam at 2/25/2008 5:38:02 AM
I am developing a windows service that read data from a device attached to a PC via serial port, then service should put the data in the clipboard. I am writing this code: Clipboard.Clear(); Clipboard.SetText("Some Text"); but for some reason, no data is sent to the clipboard! Is it becau...more >>

Randomise character positions in string
Posted by Mike P at 2/25/2008 4:28:25 AM
Does anybody have a simple method for randomising the character positions in a string? *** Sent via Developersdex http://www.developersdex.com ***...more >>

Frustrating COM Problem
Posted by oddball.bfi@gmail.com at 2/25/2008 4:17:09 AM
Hi there. I need help retrieving the type of a COM object at run-time. All the examples I've found assume you know the object type in advance - I need some way to get a list of Interfaces a COM object implements. It's driving me mad - help!...more >>

Simulate mouse clicks and keyboard input
Posted by progger at 2/25/2008 3:51:02 AM
I have a C# application that hosts an AxWebBrowser control which I automate by sending mouse clicks and keyboard input. I have had various problems in doing this due to a bug in the AxWebBrowser receiving input when it is hosting a flash page however I have got it to work using SendKeys for th...more >>

Generics & Sorting
Posted by TC at 2/25/2008 3:28:20 AM
Hey All, I've been handed a brain teaser of sorts and I'm hoping that you may be of assistance. Using a List or such of Generics objects, what would be the best way of constructing one's own sorting algorithm? For example, say we have class 'Dog' which has the properties 'Color', 'Age' ...more >>

FTP uploader web appication --- please help!
Posted by almurph@altavista.com at 2/25/2008 2:20:26 AM
Hi, I'm wondering can you help me a little bit with this one. I have to write a password protected website that when the user logs in they can browse to a file and upload it to a predetermined site. I'm fine with the first bit (that's okay - the web site and password protectioin and browse ...more >>

Displaying unparsed HTML in a WebBrowser control
Posted by Artie at 2/25/2008 1:49:34 AM
Hi, I'm using a WebBrowser control to display xml formatted to html using a stylesheet. In certain scenarios, if I detect that the xml is invalid, I'd need to display the raw invalid xml in the WebBrowser control. I've wrapped the raw invalid xml in some html tags, and it displays, however...more >>


DevelopmentNow Blog