.net

How will you process date values stored in varchar fields?

Your user wants a report sorted by date. This report is being created using C# and ODP.NET You do a sort on the Date column and the output is not exactly what the user expected. Upon some closer inspection, you find that the date column is a varchar2 field. The values in the column are stored in DD-MON-YY "01-JAN-10" format. How will ...

.NET: Posting Xml to a web-server?

What is the proper way to post an XmlDocument to a web-server? Here is the skeleton function: public static void PostXml(XmlDocument doc, String url) { //TODO: write this } Right now i use: //Warning: Do not use this PostXml implmentation //It doesn't adjust the Xml to match the encoding used by WebClient public static void Po...

Help in jquery validation.

I am using jquery validation plugin to validate my form on client side. I am adding a new method using addMethod function for every HTML control which have regex (custom) attribute. My HTML control would look like. <input type="text" id="txtInf" name="txtInf" regex="some regular exp" error="check your inf"></input> $("*[regex]").each(...

Window min width in WPF

Hello... I have a 2 collumn grid for my application. The one has some minimum width and has width = * and the other has width=auto.. The problem is that when i resize the window ,when the grid has its minimum width the window shouldnt resize.... I can set min width but i should guess the width of the auto collumn and this is not good i ...

.Net Micro Framework, Digi Connect ME on version 4.0?

Has anyone devised a way to run versions of .Net Micro Framework on the Digi Connect ME? Digi stopped working with .Net MF at version 2.5. Thanks. ...

Linq to XML...I never get any Descendent values with XML as-is

Here is part of the xml I am trying to parse: <?xml version="1.0" encoding="UTF-8"?> <Workflow xmlns="http://soap.sforce.com/2006/04/metadata"&gt; <alerts> <fullName>Broker_Not_In_SF_Current_Broker_Account</fullName> <description>Broker Not In SF - Current Broker Account</description> <protected>false</protec...

How will you fetch static data in your windows form application?

What's your approach to fetch static data in your windows form application? My approach is to load an arrayList with data when the user logs in. Then reuse this arraylist which will save round trips to the database. This means if you add something to static data, (a rare occasion), you will have to exit your windows forms application a...

Get the latest updated sub-directory

Am trying to find the latest sub-directory from a parent director. public static DirectoryInfo GetLatestSubDirectory(string parentDirPath) As of now the implementation is uses the bubble sort algorithm to find the latest by comparing the creation time. if (subDirInfo.CreationTimeUtc > latestSubDirInfo.CreationTimeUtc) Am wonderin...

Can I use a Windows -> Class Library inside a WP7 application?

I'm creating a library application that will act as a wrapper for an exposed API. This library ideally should work on any desktop application, but truth be told I'm intending to use this on the WP7 once I'm done creating the library. Would this work? ...

Visual Studio setup project along-side self-updating logic?

I'm looking to implement a setup package for my multi-project solution that installs a Windows Service as well as a Winforms application. Both the service and the application have an ability to update themselves via a custom web-based utility that I wrote. So basically, the Windows service updates its own DLL's on a regular basis if it ...

COM method call fails in C#, VB.NET, but works in Python

I'm having trouble with a COM library I'm trying to use. I get an ArgumentException when I call a particular method and pass it null. This happens to me in both a C# project and a VB.NET project (I call the method using Nothing) where I added the library reference from the "COM" list in Visual Studio 2008. When I call this same method...

Save screenshot of WPF web browser Frame

I have a Frame element displaying an html page in my WPF application, and would like to save a screenshot of the Frame as an image. With the help of the google, I have this code: Size size = new Size(PreviewFrame.ActualWidth, PreviewFrame.ActualHeight); PreviewFrame.Measure(size); PreviewFrame.Arrange(new Rect(size)); var renderBitmap...

Force IE to get a page

I've tried numerous ways to get IE8 to reload a page but failed. IE just keeps using it's internal cache without asking the webserver for it. I'm sending the following headers from my webserver: Response.Add(new StringHeader("Expires", DateTime.UtcNow.AddYears(-1).ToString("r"))); Response.Add(new StringHeader("Cache-Control", "no-stor...

Non-LINQ implementations of Union, Intersect, and Except

LINQ to objects has the incredibly useful Union, Intersect, and Except methods. Sadly, there's a client I'm doing work for and they are mandating .NET 2.0 so LINQ is not an option. I looked through the reflected code and it didn't reverse well at all. Is there a .NET 2.0 library or easy implementation of Union, Intersect, and Except? ...

build .net solution from batch file

Hi I have a solution file comprising of 15 projects using a few third party dll references. I want to be able to build the solution from a batch file. What is the best way to do this? Thanks ...

list of all available server controls

Just as the title states, can anyone point me to a list of all available asp.net server controls (preferably with descriptions)? I would have thought that something like this would be readily available but I've had no luck finding this. I almost always have to dig around to find a control to solve a particular problem, a quick referenc...

Publisher is Unverified Message in Windows Vista...

I wrote a small .NET app that I've been running locally on my Windows 7 box/Windows 7 laptop. It runs great, no problems at all. I've given the same app to a friend of mine; he has the .Net framework installed but when he goes to run the .exe he gets a warning saying something about the publisher being unverified. He can either cancel...

Talking to unmanaged process from .NET

Hi, I'm creating a process from .NET using Process.Start. The new process is a legacy app, written in C/C++. To communicate with it, I need to do the equivalent of PostThreadMessage to its primary thread. I'd be happy to use P/Invoke to call PostThreadMessage, but I can't see how to find the primary thread. The Process object has a col...

.NET How to find CivicAddress?

this code returns an empty string. What can I do to return something please? CivicAddressResolver civicResolver = new CivicAddressResolver(); CivicAddress c = civicResolver.ResolveAddress(new GeoCoordinate(39,77)); textBlock1.Text = c.City; ...

LRU file cache and the cost of finding a file in a Windows directory

I have an application that will download and cache, at a minimum, 250,000 8KB* files totaling about 2GB. I need to remove the least recently used file when updating this cache. *These tiny files span two 4KB sectors. What is the relative cost of obtaining a file handle by name for this type of file in a directory on an NTFS-formatted 5...