.net

Is there an OpenFileOrFolderDialog object in .NET?

Is it possible to use the OpenFileDialog class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it will navigate to that folder. If the OpenFileDialog can not be used for this is there another object I should be using? EDIT: The scenario is that I have a tool that c...

Mashups and SharePoint

Can somebody in SO please provide me with a list of resources about Enterprise Mashups and technologies related to SharePoint platform? Update (as per suggestion of @Spoon16 in the comments):- The mashup application may typically retrieve a list of contacts from a SharePoint site and display the address of a selected contact person on a...

Looking for C# HTML parser

I would like to extract the structure of the HTML document - so the tags are more important than the content. Ideally, it would be able to cope reasonably with badly-formed HTML to some extent also. Anyone know of a reliable and efficient parser? ...

Neural Network example in .NET

Hi. Any good tutorial with source that will demonstrate how to develop neural network (step bay step for dummies ;-)) ...

What are good open source projects in .NET that I can work on

I am looking for some useful open source projects that I wish to participate. Please provide the websites and the projects. ...

How do you bind in xaml to a dynamic xpath?

I have a list box that displays items based on an xpath. This xpath changes depending on user selection elsewhere in the gui. The xpath always refers to the same document. At the moment i use some c# code behind to change the binding of the control to a new xpath expression. I'd like instead to bind in xaml to an xpath and then change...

Moving to ASP.NET - VB or C#?

We have a large ASP classic code base but I'm looking to do future development in ASP.NET (and potentially in the future port across what we have). The natural choice of language seems to be VB (existing code is VBScript) but am I being too hasty? Does the choice of language, in the long run, even make a difference? ...

WSDL.exe download

I recently heart from WSDL.Exe, but did not find a download link. Anybody know the link? ...

DirectoryInfo.GetDirectories() and attributes

I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path. How ever I want to exclude the System folders and there is no clear way for that. In FindFirstFile/FindNextFile things were clearer with the attributes. Thanks in advanced. ...

Is there a better way to explain the behaviour differences between structs and classes in .net?

The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses public fields - that's purely for brevity) namespace StructsVsClasses { class Program { static void Main(string[] arg...

How do you cast an IEnumerable<t> or IQueryable<t> to an EntitySet<t> ?

In this situation I am trying to perform a data import from an XML file to a database using LINQ to XML and LINQ to SQL. Here's my LINQ data model: public struct Page { public string Name; public char Status; public EntitySet<PageContent> PageContents; } public struct PageContent { public string Content; public str...

What is the difference between the <%# and <%= opening tags?

While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it? ...

ASP.NET: Syncing client and server-side validation rules

Are there any easy, smart ways to keep your client and server-side validation-rules synchronized? On the client side we have JavaScript, maybe some kind of framework like jQuery or YUI. On the server-side we have ASP.NET WebForms or ASP.NET MVC. What is validated are things like: Correct e-mail-addresses Correct home-addresses and p...

Choosing xpath version for .net IIS apps

We've got a .net CMS running on IIS 6 which uses xslt templates. It seems to be running xpath 1.0 (as we can't use any 2.0 functionality). How do we go about installing or specifying that IIS should use xpath 2.0? Is it installed per server, or can we specify which version to use on a per-application pool or per-site basis? Thanks a lo...

Is there a zip-like method in .Net?

In Python there is a really neat function called zip which can be used to iterate through two lists at the same time: list1 = [1, 2, 3] list2 = ["a", "b", "c"] for v1, v2 in zip(list1, list2): print v1 + " " + v2 The above code shoul produce the following: 1 a 2 b 3 c I wonder if there is a method like it available in .Net? I'm ...

Which is the best .Net XML-RPC library?

I need to communicate with an XML-RPC server from a .NET 2.0 client. Can you recommend any libraries? EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing an XML-RPC service which uses the unorthodox technique of having object nam...

Triggering a .NET garbage collection externally

Is there a way to trigger a garbage collection in a .NET process from another process or from inside WinDBG? There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button that suggests it does this, but I can't find any documentation on how to do it. ...

Letting several assemblies access the same text file

I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it? I've tried using "AppDomain.CurrentDomain.BaseDirectory" but that ends up being...

Why is there not a ForEach extension method on the IEnumerable interface?

Inspired by another question asking about the missing Zip function: Why is there no ForEach extension method in the Enumerable class? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing (performance)? ...

How do I do Dependency Injection in a test project (TFS 2008) using Castle

I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able to load said classes. private static readonly WindsorContainer _container = new WindsorContainer(new XmlInterpr...