.net-2.0

.net 2.0 ajax tree

Right, so I have to build a web app in asp.net 2.0 winforms. Id much much much prefer 3.5 MVC. because its cleaner, leaner, more modern and makes more sense to me. I know 3.5 MVC well, and have come from a Rails background, so this webforms stuff looks kinda gross to me :P. Anyway, I need an AJAX-backed tree control, one that loads the ...

Custom DataTable searches

EDIT: Note. I should have mentioned I'm not interested in using the .Select, DataRowView, RowFind, etc. Thank you for those suggestions but the code as it stands, I was hoping to optimize. I wrote a function to search a datatable for terms in an array. I then return the datatable as a dataset so it can be bound to a DataGridView. Do...

Determine state of keyboard in non-keyboard-event method call.

Hi In a textbox.TextChanged event I want to prevent some specific (processor intensive) functionality from executing if a key is still held down. E.g. while the user is deleting large regions of text by holding down the delete key I want to prevent the code from firing if the delete key is still held down. I looked into Control.Modifie...

ASP.Net AJAX isn't creating Javascript type

I'm using ASP.Net AJAX and I created a web service in my application. The service has one method (AddWatchedFolder) and it takes a Name.Space.WatchedFolder as the only parameter. The problem is, ASP.Net AJAX isn't generating a javascript type for Name.Space.WatchedFolder even though I've added the service to a ScriptManager. I am able t...

Calling a method when a tree node is clicked in the Standard ASP.NET 2.0 TreeView

I have a treeview which i populate dynamically using an XML Datasource. The leaf nodes in the TreeView attempt to open a URL in an iframe within the page. This all works fine, but i would like the iframe to be hidden until the point the leaf node is selected. Does anyone know what event is triggered when the nodes are clicked?? I trie...

ASP.NET FileUpload control not working inside Wizard control.

I have a Wizard control with one of the pages containing a FileUpload control. I want to access the file stream at the point of the final page of the wizard but this doesn't seem to work. As far as I can see, you can only access the file stream for the posted file on the postback which occurs immediately after the control has been used....

C# Attribute Limit

Is it possible to limit the number of properties that an attribute is applied to in a particular class? ...

Must Satellite Assembly versions match the base version?

I just ran into a situation where I needed to patch a release with a new version of one of our assemblies. All my assemblies are strong names and this is a Windows Forms application. I edited my App.config to do the appropriate re-mappings and all went fine until we tested our software with our localized version. The problem we saw is...

With NAnt, How to use C# 3.0 compiler while targetting .NET 2.0 runtime?

I'm using NAnt 0.85 to build a legacy project. The script itself uses the csc task (not the msbuild task) and works fine. The project is on its way to migrating over .NET 3.5. We already use VS2008, and C# 3.0, while still targeting .NET 2.0 framework runtime. Now the problem occurs when we want to upgrade our NAnt scripts, to compile ...

yet another Data Access Layer ( c# .net 2.0)

Realised I am writing yet another code generator to do the sps/classes/interfaces etc for a simple ORM layer. This time most of the guts are in SQL. I have a general-purpose C# DAL for calling sps/getting results etc. (took me all of an hour or so and is tiny). I thought for sure there'd be an easier way by now... is there? I am confid...

To access .UDL file from the sqlclient connection

Hi, I have a .udl file with the following connection string in it [oledb] ; Everything after this line is an OLE DB initstring Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Client_DB050208;Data Source=IAEADB\IAEADBDEV;;Network Library=dbmssocn Now i am trying to access this .udl file from the...

Standard Function for Escaping Strings in SQL

I'm writing a program in .NET2.0 and I need to escape the inputs before using them. Unfortunately the standard parameter method system does not fully work in the system I'm using. Using the ODBCCommand class I cannot place a ? parameter in the select part of the statement (which is required for the little bit of trickiness I'm doing) w...

Connect to FTP Server with .net 2.0

I'm looking to connect to an existing ftp server, upload a file, wait while the server generates a report on it, and download that report back to the local machine in a vb.net 2.0 winforms project. Is there an existing FTP library that would be helpful to me for this? My task seems simple enough that I'd rather not get into the world o...

Using Extension Methods with .NET Framework 2.0

Under Visual Studio 2008 Can I create an Extension Method to work under a .NET Framework 2.0 project? ...

ASP.NET 2.0 Newsletter Feature Control with code needed

Hello Everyone, I am looking for an open source ASP.NET 2.0 control along with code for my website. I found one at www.i386.com/Products/Newsletter.aspx but unfortunately it doesn't open in VS2005 or may be isn't compatible with ASP.NET 2.0 though it is claimed to be compatible with ASP.NET 2.0 on website. I want my customers to be abl...

My windows form is saving null value for RadioButton in SQL database.

I built a Parts Request form, and part of the form is the Approval process. This form sends an email message to the Requester indicating the decision. on My Supervisor form there are two radio buttons, one for approved and one for rejected. Now my problem is, when reviewing the requests in the application, the decision is not always ...

When would I use an AppDomain?

I'm fairly new to reflection and I was wonder what I would use a (second) AppDomain for? What practical application would one have in a business application? ...

What's a good, affordable "knob" library?

I'm currently thinking of a new pet project, an "editor" for MIDI-enabled synths. I've got the MIDI side covered, I suppose, but what I'm looking for right now is something that can pass for nice "dials" and "knobs" like you see in Ableton Live, Reason, Reaktor, and so forth. Putting my form full of trackbars, is sort of wasteful, y'kno...

Winforms UserControl shows rectangles with Inverted Colors

In a Winforms application (C#2, FX2.0, VC2008) I am using a Panel derived Control to display custom controls. The controls are arranged vertically and there are usually more than fit in the visible area of the panel. I have drawn a litte sketch of it: Sometimes (usually after scrolling inside the panel) rectangular areas appear to ha...

Starting a windows service fails with error 1053

I have a windows service that is failing to start, giving an error "Error 1053: The service did not respond to the start or control request in a timely fashion". Running the service in my debugger works fine, and if I double click on the the service .exe on the remote machine a console window pops up and continues to run without proble...