.net

CFormView and CListView on splitterwindow

I want to make a CFormView and a CListView in a splitterwindow configuration. My problem is how do i transfer my data from the list view to my edit controls on the form view and vice versa. Please help. ...

Overcome OS Imposed Windows Form Minimum Size Limit

In an application I am developing, I need to be able to make a windows form smaller than the minimum height limit imposed by the operating system (36 px in Vista). I have tried intercepting WM_GETMINMAXINFO and providing my own information to override the OS limits, but this only works for the user. From code I can set the height to a ...

How to GET data from an URL and save it into a file in binary in C#.NET without the encoding mess?

In C#.NET, I want to fetch data from an URL and save it to a file in binary. Using HttpWebRequest/Streamreader to read into a string and saving using StreamWriter works fine with ASCII, but non-ASCII characters get mangled because the Systems thinks it has to worry about Encodings, encode to Unicode or from or whatever. What is the ea...

What .net files should be excluded from source control?

What file extensions from a .net application should be excluded from source control and why please? ...

Accessing Windows Scheduled Task using C#

How do I change the credentials used by a scheduled task using C#.NET? ...

Performance : encapsulating a string in a struct?

Hi, Would there be any perforamce gain in ecapsulating a string in a lightweight reference object vs encapsulating a string in a struct. Would the string variable not utlimately point to the heap anyway , irrespective of whether it is contained within a value type or reference type? ...

Drop table, Sql Compact edition

How do I drop Sqlce table from within VB Express 2008? Any help appreciated... ...

How can I emulate End Process Tree in C#/.Net

We have a web application that has to launch other processes. Typically these processes are batch files that launch a series of other processes. Sometimes we need to kill a batch file process that is running and to do that we need to kill it and its children. What is the best way to go about this in .Net? ...

Can SyndicationFeed.Load be made more robust?

I am trying to read a handful of Rss / Atom feeds with var synFeed = SyndicationFeed.Load(reader); But it throws on the slightest problem. For instance, when one Item contains a few HTML tags in the description field, it's not possible to read the Feed at all. It also doesn't like the RDF tags from for instance SlashDot. Note that ...

IPrincipal from WCF request

Can i get the requester windows IPrincipal when he comsume WCF service? ...

What is Windows programming and where it is headed? Honestly win32 is dead, isn't it?

Duplicate: How relevant is Win32 programming to modern professionals? Does it still make sense to learn low level WinAPI programming? I recently read a blog entry about someone asking for a good book on windows programming. He was disturbed by the fact that most books he found are about 10 years old and probably outdated...

What's the deal with the ToolStrip's RenderMode property?

I never quite understood what this property was designed for. I can see that it visibly changes the design of the toolstrip and I find that setting it to System on Windows XP makes it fit much better with the WinForms style. Is there some deeper meaning here? Does the way in which the control is rendered change at all and which mode wou...

C# toolstrip menu & something more

Hello , i have the following situation : with my function i get an XML file , parse it and add group box with image and a text box for every post node in the XML file , And for each group box i assign name and toolstrip menu which has a dinamicly added 1 item the thing i want to do is this - when clicked this item ( lets say the item ha...

CSS file in asp.net website

I have css file reference in my website which is shown as below: <link rel="stylesheet" type="text/css" href="http://go/css/filename.css"&gt; I need to alter the CSS file and upload it in the new location. Is it possible to put it in my local system or can I upload it in same website? ...

Are mutually-dependent child/parent namespaces a code smell?

I was looking at some dependency graphs for my primary personal project recently, and I noticed that I had a mutual dependency between objects in nested namespaces. E.g., I had an object in MyNamespace.Foo that implemented a generic interface in MyNamespace.Foo.Interfaces with that object as the generic parameter in the interface. name...

C# Code optimization

who could be faster ? and why ? 1: Point point = new Point(25,25); //any numbers.. Point point2 = new Point(20,95); //any numbers.. Graphics g = CreateGraphics(); g.DrawLine(point,point2); OR 2: Graphics g = CreateGraphics(); g.DrawLine(new Point(25,25),new Point(20,95)); ...

Image from HttpHandler won't cache in browser

I'm serving up an image from a database using an IHttpHandler. The relevant code is here: public void ProcessRequest(HttpContext context) { context.Response.ContentType = "image/jpeg"; int imageID; if (int.TryParse(context.Request.QueryString["id"], out imageID)) { var photo = new CoasterPhoto(imageID); if (pho...

Operating System for first production windows server code?

I'm getting ready to purchase a server for me to deploy my first windows based (C# .NET) application but I'm not familiar with using windows for hosted applications. I have the choice of the following versions of windows: Windows Server 2003 Windows Server 2003 Web Windows Server 2003 Enterprise Windows Server 2008 Windows Server 2008...

How to call a web service using stored credentials?

I need to call a web service running in a Windows domain that is different than the one the (Windows Forms) client is running in. The web service is secured using Windows authentication. The domain credentials for web service's domain are saved in the client's user profile (Saved user names and passwords in XP), but I have not been ab...

Solving UnauthorizedAccessException issue for listing files

Listing all files in a drive other than my system drive throws an UnauthorizedAccessException. How can I solve this problem? Is there a way to grant my application the access it needs? My code: Directory.GetFiles("S:\\", ...) ...