.net-2.0

Expose additional classes in ASP.NET 2.0 webservice

Consider a webmethod which exposes an abstract class: [WebMethod] public void Save(AbstractEntity obj) { // .. } There are several classes inheriting from AbstractEntity like public class Patient : AbstractEntity { // ... } Now I want to enable the webservice consumer to create a new Patient object and save it: service....

Should I be having perf issues with a large list of objects implementing INotifyPropertyChanged?

I am trying to improve the performance of a DataGridView hooked up to a collection of custom data objects. The collection doesn't actually change size once initialized (i.e., no data objects are added or removed once the list is loaded on start-up), but the properties of the data objects dynamically change, and the grid is basically supp...

How to compare managed and unmanaged Strings?

I have an application that uses managed System::String in the UI elements, but then refers to un-managed (read: legacy) code for the more complex computation. Additionally, there is not a consistent encoding for the strings - managed strings can be either regular "strings" or Unicode L"strings" and un-managed strings come in all of char...

Multiple simultaneous .NET IPC servers / find the right one by process ID?

I have a database client application. Some people will run multiple instances (i.e. processes) of it to connect to different databases simultaneously. I'd like to have this app accept a custom URI scheme for simple commands such as 'open record 123'. The URI contains the database it pertains to, so, depend on the contents of the URL, one...

Is is possible to use the AsyncFileUpload from the AjaxControlToolkit in a .Net 2.0 project?

The title pretty much says it all. I have a project that for political reasons cannot be moved to a later version of .Net and would love to have a drop-in control for uploading files better than the old FileUpload control. I'd like to use the AsyncFileUpload control, but it's not in the latest version of the toolkit that is supported i...

does an list of lists smell bad, what are my other options

I need to assemble an list of lists, but the whole idea doesn't sound too pretty. It just sounds so cumbersome. is there some other pattern for holding a list of lists. my first though is to use an arrayList of Arraylist. c#, .net-2 more: then number of items to be stored is small but always changing. NOTE: I was corrected on the use...

WebBrowser control

Ok, so here's the deal -- I'm running a Windows Forms WebBrowser control from a service. I know thats a no-no, but it seems to work alright. The only thing I'm running into a problem with is trying to wait for the browser's pages to load. In a normal application, I'd just do something like while (browser.readystate != complete) Appli...

delete files which are more than one month old using c#

hello folks., how to delete files which are more than one month old using c# script. i am using framework 2.0.. ...

Can I find a file by filename only (i.e. extension unknown)

We have a network folder that is the landing place for csv files processed by different servers. We alter the extension of the csv files to match the server that processed the file; for instance a file with the name FooBar that was process by Server1 would land in the network share with the name FooBar.Server_1. The information I hav...

how do I use netdde in .net

I would like to use NETDDE in .net 2.0, but I am having a difficult time getting started. I am looking for a few pointers. thanks ...

How to extract files from .CAB file using C#.Net?

Hi All, I have a CAB file generated from CABARC.EXE. I need to extract the file using ASP.Net C#.Net. How to do it in C#.net itself? I don't want to use the same CABARC.EXE for extraction. Because we don't use this tool in production environment. Please give your valuable suggestions/code to achieve this task. Thanks in advance Gane...

If I target .NET 2.0, can I still get runtime features from newer versions?

I'm pretty pleased with targeting .NET 2.0 for my XNA games on the basis that it is more widely available (and I can still use nice C# 3.0 language features). But I recently came across an article saying that the .NET 3.5 SP1 JIT added inlining of value-type methods (something that, as a game developer, I use a lot of). So my question ...

SAP Measurement RFC

Hello, I have been using "MEASUREM_DOCUM_RFC_SINGLE_001" to update a measurment point in SAP through .net 2.0. This has worked quite well for us. I would like to read the latest measurement point, but I am unable to find a RFC in the Function group IMR0. thanks for any help you can provide. SAP,C# ,net-2.0 ...

Http Listener doesn't work on Port 8080 or other ports (works only on port 80)

Hi, I wrote a simple WebServer using HttpListener class (.net 2.0) It seems that It doesn't work on port other then 80. When i sniff the transport to my server i can see the Syn packets on Port 8080 arrive to the server, but there is no Syn/Ack response, although when i sue netstat -a i can see that the server is listening to port 808...

How to generate an ASP.NET 2.0 (retro) web.config within Visual Studio 2010

Hi all, I'm using VS 2010 Express Edition (VWD) to develop a website project that will be deployed to a Windows 2000 Server (targeting .NET 2.0). BACKGROUND: The website was new, so I chose the 'c# blank website' project template in VS 2010. This (as you may know) gave me an extremely more lean web.config file than VS 2008. I like tha...

Prevent databind on Gridview when clicking the Edit template link

My Gridview is refreshing its datasource when the edit button is clicked. How can I prevent this from happening? This isn't much of a problem when there aren't a lot of records, but when there are many it takes awhile. The data is already loaded so the edit button shouldn't need to reload the data. The edit button is a template edit ...

Nhibernate Projection Query DTO, use method in stead of property

Hey, This works: projections.Add(Projections.Property(Member<MailOrder>.From(x => x.AssigneeCode).QualifiedPath), Member<MailOrderItem>.From(x => x.AssigneeCode).Path); projections.Add(Projections.Property(Member<MailOrder>.From(x => x.AssigneeName).QualifiedPath), Member<MailOrderItem>.From(x => x.AssigneeName).Path); proj...

Constrain type to specific types

Is it possible to constrain a generic method on specific types? I want to write something like this: public T GetValue<T>(string _attributeValue) where T : float, string { return default(T); // do some other stuff in reality } I'm mostly just trying to avoid having a giant switch statement inside the method or having to throw an ...

Is there any way to load an assembly complied in VS2010 in VS2005?

We have a function in a VS2005 project that loads assembles and get type information from them . It does not instantiate these types though. We tried to load some assembles that are compiled in 2010, but keep getting the following exception. "Could not load file or assembly '2010ClassLibrary' or one of its dependencies. This assembly i...

VS2005 Options Generate Method Stub not working.

Ok I installed the linq preview(May 2006) and it seems to have screwed me up. Now the one the of the most important features in VS2005 is not working anymore (Options Generate Method Stub (Shift+Alt+F10)). I used to get this message every time I would start a project ("This is an unsupported version of Microsoft Visual C# 3.0 / Microsoft...