.net-2.0

Transactions in .Net 2.0 application-- what to use?

Hi everyone, I'm working on a .Net 2.0 application and need to wrap some database transactions in my code. The backend is SQL Server 2008. I've been away from .net for a few years, the last time I did any transaction processing was in .Net 1.1 with serviced components. I know about TransactionScope, and was wondering if that's a good...

Good way to combine two List<T>s in .NET 2.0?

I have two lists I need to form the union of, but I'm in .NET 2.0 so the Union() method appears to be out. These are lists of integers, so no problem with the equality comparisons. What's a good way to go about this? ...

Rendering form to bitmap

I would like to render Form to bitmap... Is it possible in .net 2.0? ...

Gridview item preview using .net 2.0

Hi, I have a GridView control that for each item has a Hyperlinkfield with a URL to an aspx page. I want to (using AJAX libraries) to display the page preview in an inline window as the user hovers over each GridView row hyperlink. Can anyone suggest the best way to implement a preview of each row's hyperlinked aspx page as the user ...

Autopaging or custom paging which is better in datagrid?

i used datagrid control in .net platform... but now i am in big confusion .. that is ..which is better to used custom or autopaging option.. gud explaination or example is needed.. i dont know about any method.. very well. i find on search.. but i dont find good material.. thanks... ...

MySQL.Data: "Object reference not set to an instance of an object" when trying to Connect.

I have a "Cron Service" that i've had running on our production server for over a year and a half. It's a regular windows service which every minute connects to the DB, checks on one table whether there's something to do, and if so, does it. This is a server for a website that's not used a lot, so most of the time the service is complet...

Determine which w3wp.exe process belongs to which App Pool in Windows 7 / IIS7.5?

I've recently upgraded my development machine from Windows XP to Windows 7. How can I tell which w3wp.exe process belongs to which App Pool on a desktop running Windows 7? On a server running IIS6, you can run c:\windows\system32\cscript iisapp.vbs On a Windows 2008 Server running IIS7 you can run appcmd list wp But what about on my...

Problem with datatable bound to a datagridview

I've a datatable bound to a gridview. The datatable has the following data: JobID Site Job List --------- --------- --------- --------- 134 A job1 26 2241 A job2 25 124 A job3 26 244 B job1 12 154 B ads2 46 Am trying to take the count of distinct sites. So I write the following function: public void CreateAdmins(DataTable...

Override Events in VB.NET

Hello I would like to shadow/override an event in VB.NET. I do it only because I have to implement in this object an interface, that contains the same event like the base object itself, and I need to keep this base event as is it without modification nor supplementary event additions. How can I do it? Public Shadows Event VisibleCha...

Why? Redeclare things to implement interfaces?! in VB.NET

Hello, experts. I work in VB.NET v2 I have an interface IMyInterface and this interface implements a method MyMethod. I have an object MyObjectBase. This object contains a(the same) method MyMethod. 1) If now I do MyObject Inherits MyObjectBase Implements IMyInterface need I to redefine? (shadow, override) MyMethod in the MyObject cl...

How can you dynamically generate list items to an unordered list in ASP.NET?

I have an error panel that is subbed in to a page if an error goes wrong to gracefully handle and display errors. Currently, I am just appending the error messages to a string and pushing that to a label. If you have multiple errors, this gets messy. Therefore, I'd like to push each error to a list item in a bulleted, unordered list. ...

Ajax extension in .NET 2.0 ?

Question: If I want to use ajax extension with Visual Studio 2005, i have to download ajax extensions. Now here's my question: Do I need to do this only for development, or do I also need to install something on the production server if I make my project use ajax extensions? ...

Reporting Services & Web Application (with HTTPHandler)

We are trying to add SQL Reporting Services to a .Net 2.0 Web Application. SRS has been installed on the server successfully, but we get an error when we try to load a report or access the report manager: Server Error in '/Reports' Application. -------------------------------------------------------------------------------- Configurat...

.NET container for two-way conversion data?

Hi all, I have conversion tables I need to contain in memory for fast access. Until now I used a simple Hashtable were the Key was the internal code, and the Value was an object holding the external code and other meta-data. Now we need to have a reverse look-up, meaning to get the internal code based on the external code. I could only...

Java Web Service for .NET 2.0 Client on Linux (Fedora)

Hi, I'm tasked with creating a Java Web Service for a .NET 2.0 client to consume. What would your suggestions for the implementation be? The solution doesn't need to be very heavyweight (don't need a full Java EE container I believe) but what do you think is the best solution for this? I have thought about using Glassfish v2 with JAX-...

WCF Service with .NET 2.0 and Java Clients

Hello, My WCF Service is complete with .NET 3.5 and I used wsHttpBinding while implementing my service. For .NET 3.5 clients, there were no problems, but .NET 2.0 and Java Clients had issues in wsHttpBinding. So I added a new endpoint with basicHttpBinding with similar security as wsHttpBinding with following criteria in mind: I wou...

Why am I unable to access "System.DirectoryServices" from any namespace but my presentation layer?

I am accessing active directory with the System.DirectoryServices library, currently in my web layer. However, I'm trying to move a function from a code-behind file to a VB class in another namespace, and I cannot seem to access that class from within that namespace. What gives?! ...

.Net multitargeting gone wrong?

Hi, I have a small dummy project in VS 2008, contains only the following code file using System; namespace FrameworkTest { internal static class MessageQueueNative { struct TestStructure { public IntPtr aStatus; } public static void Main() { TestStructure pMgmtProps = new TestStructure { a...

C# - Can a List<MyClass> be seemlessly cast to a List<Interface> or similar?

I have a DataSource in my control which is always a List<T> where T has to inherit from IEntity. public class MyClass<T> where T : IEntity { public List<T> DataSource { get; set; } } Now, obviously you can't cast a List<T> to a List<IEntity> doing the following: List<IEntity> wontWork = (List<IEntity>)this...

C# Static Property Locking

Just looking for a code review of this code. ASP.net Cache is not an option. The static list will be accessed a lot on a website that gets well over 10K page views per day and concurrent read attempts is likely. On app restart when the list is rebuilt I was wondering if there are any issues I may be overlooking? Is locking on the list be...