.net

Guide to MS/.NET/C# certifications?

We've started looking at getting MS certifications at my job, trying to get a more even level of skill and knowledge in our teams. So I'm left wondering if there is any "roadmap" or guide from Microsoft that you can look at/follow to know what certifications are applicable to your organization, what the contain, cost, etc. ? ...

StreamWriter not creating new file

I'm trying to create a new log file every hour with the following code running on a server. The first log file of the day is being created and written to fine, but no further log files that day get created. Any ideas what might be going wrong? No exceptions are thrown either. private void LogMessage(Message msg) { string name = _log...

Does webMethods CAF have .Net capabilities?

In a scenario where Software AG's webMethods Composite Application Framework (CAF) experienced developers are hard to find, compared to .Net, this question comes into play: does webMethods CAF have .Net integration capabilities? ...

Append XML string block WITH NAMESPACE REF to existing XmlDocument in .NET

I have an xml document (XmlDocument) which looks like this... <stuff xmlns:n="hhtp://tempuri.com/"> </stuff> ... and a "fragment" (string) which looks like this <things> <thing n:type="info"> </thing> </things> I want to "inject" the fragment into the main document. How? (HINT: You can't use XmlDocumentFragment because th...

WPF runtime control creation

Is there any good tutorial for creating WPF controls entirely at runtime? Thanks ...

How to overcome case sensitive problem with contains method.??

Is there any solution to overcome case-sensitive problem for contains method. I have code like below string str = m_name; return avobj.Viewname.Contains(str); Eg: Welcome Here welcome here Both are same names but case is different. If I give 'W' in search box it is returning only 1st one. but I need both names display. I am sto...

WMI Win32_OperatingSystem OSArchitecture field causes exception

I am trying to get information on the version of Windows installed from WMI. Most fields work. I can get the operating system "Name" as well as the "Version", both are fields of the Win32_OperatingSystem object I have. But another field "OSArchitecture" generates an exception ("Not found"). strScope = "\\" + strServer + "\root\CIMV...

.NET DataGridView rows' default alignment all set to left

DataGridView gets bound to DataTable. I then try to set some columns' DefaultCellStyle.Alignment to right. It doesn't work. After a bunch of tinkering, it turns out that every single row's DefaultCellStyle.Alignment is set to left and overrides it. DataGridView.DefaultCellStyle or RowsDefaultCellStyle doesn't do anything. Makes sense sin...

Windows forms application blocks after station lock

We're having a serious issue at work. We've discovered that after the station where the client was running is locked/unlocked the client is blocked. No repaint. So the UI thread is blocked with something. Looking at the callstack of the UI thread (thread 0) using windbg we see that a UserPreferenceChanged event gets raised. It is marshal...

Removing unused local variables from .NET code

Is there a tool available that can scan a C# or VB.NET project and automatically remove all unused local variables? ...

C# windows application, how to save & restore positions of child forms.

I have a windows application with an MDI form and some child forms. I need to save the position of the child forms and then restore when it is opened again. How to do that in C#? Also, I need to check if the child form's title bar is not hidden under the mdi form (e.g title bar might get hidden because of mdi form's menus). If this is ...

Create pdf documents with 2D barcodes from .NET

How can I create pdf documents with 2D barcodes (for example QR code http://en.wikipedia.org/wiki/QR_Code) from .NET application? I will (probably) use iTextSharp for creating the documents. Which component should I use for drawing 2D barcodes? ...

executenonquery calling a parametrised stored procedure is not responding

Hi, I'm executing a SQL stored procedure from a c# code but it is not responding at all. There is no exception or error generated. The processing as if gets hung. The stored procedure consists of multiple update statements and a select statement. The stored procedure is running fine independently and takes about 3-5 minutes to execute w...

How to allow only english chars in textbox?

I want to allow only English characters to be typed in my asp:TextBox (in asp:Login conttrol). How can I do that? ...

How do I escape a LIKE clause using NHibernate Criteria?

The code we're using is straight-forward in this part of the search query: myCriteria.Add( Expression.InsensitiveLike("Code", itemCode, MatchMode.Anywhere)); and this works fine in a production environment. The issue is that one of our clients has item codes that contain % symbols which this query needs to match. The resulting SQL...

How can I deploy my .NET app to Amazon EC2?

I have a .NET Windows service and a .NET Web Application that I would like to deploy to my Amazon EC2 Windows 2008 instances. At this point, all I need to do is to copy the zipped files across to the EC2 box and remote desktop to the EC2 instance and finish the deployment. In order to do this, I have tried LogMeIn Hamachi2 to create a ...

How do I get the IP address of the desktop from windows mobile when cradled using .NET CF?

I am developing a windows mobile 6 application using .NET CF 3.5. I need to get the IP address of my desktop computer when the device is cradled in order to initiate a synchronization process from the mobile device. I have tried Dns.GetHostEntry, but this seems to return the IP address of my Pocket PC emulator. Any ideas? ...

What are the alternatives to DataGridView?

We're looking to replace DataGridView in our Winforms app. What are the alternatives - commercial or otherwise - that we ought to evaluate? ...

How to get the last day of a month?

If i have this date 03/08/1980 and I need to find the last day of the month (08) (the last day of 08 - is 31) How can I do it ? (in C#) ...

meaning of '+='

I'm confused with the syntax of C#: what is the use of "+="? ...