.net

Provider model and performance

Hi, Are there any performance implications with using the provider pattern? Does it rely on reflection for each instantiation or anything? ...

Differences between Visual Studio 2005 and 2008

Hello lads I would like to find out what is the most significant differences of MS Visual Studio.NET 2005 Pro and MS Visual Studio.NET 2008 Pro? I was given a copy of Visual Studio.NET 2005 Pro as the previous person who used that has left the organisation. Therefore, I am considering upgrading this version to VS.NET 2008 Pro. At my or...

PostBack beefore Session Check

Shouldn't PostBack be checked before Session protected void Page_Load(object sender, EventArgs e) { if (Session["login"] != null && Session["login"].ToString() == "1") { if (!IsPostBack) { LoadData(); } } else { Response.Redirect("login.aspx"); } } ...

.NET and Oracle: Joining a table to an empty set of another table

Hi all, I am trying to join tableA with some data to an empty set of another tableB. The main purpose is to get all the columns of tableB. I do not need any data of tableB. I have constucted the following SQL: SELECT uar.*, s.screen_id, s.screen_name FROM crs_screen s LEFT JOIN crs_user_access_right uar ON s.rid IS ...

If else if or Switch case

Which one is better when performance is taken into consideration an if else if or switch case Duplicate: http://stackoverflow.com/questions/395618/ifelse-vs-switch ...

How do I fetch all methods from a given namespace?

hello I want all the Method-ClassName from namespace like i have system.windows.Forms wehen in visual studio we rigt system.windows.Forms. it will suggest box of all the related method,class,enum extra i need to fetch the same ,how can i do that in C# Thanks ...

How to read ISBN from eBooks on CHM or PDF files

I'm doing a database for storing my eBook collection. Most of them have the ISBN within the text of the book itself. How can I access this contents? Is there any sourcecode or DLLs for doing that? ...

What's the simplest way to format a .NET DateTime according to YYYYMMDD or the like?

I have a DateTime class and wish to display it according to some format... in this case, I specifically want to format it as YYYYMMDD format. What's the best C#/.NET API function for doing this? ...

It's possible to develop for .net 2.x in Visual Studio 2008?

Hi, It's possible to develop only for .net 2.0 running Visual Studio 2008? Thanks! ...

Calling SSIS package Asynchronously

Hi, I'm calling a SSIS package using LoadPackage(...). Is it possible to make this call an Asynchronous call? ...

Calling a C# method, and make it take 10 seconds to return

From a web service (WCF), I want an endpoint to take 10 seconds to finish. Is there a way I can do a thread.sleep(10); on the method? ...

Updating an application with 100% uptime

In a past interview, I was asked how would I write a mission critical windows service which must maintain 100% uptime, be very responsive, and also be updatable. The service was described as a remoting based application which takes in requests, performs calculations and sends a response back. My solution was to have a very generic servi...

Running many versions of .net on a machine

I'm curious about the various versions of .net. We have an environment where we've developed applications in various versions (1.1 and 2.0). Now, I'm trying to get the 'go ahead' for developing in 3.5. The biggest issue is whether or not these versions will play nicely together on the same installation of IIS. Another caveat is that I'm ...

.NET - Get default value for a reflected PropertyInfo

This is really stumping me today. I'm sure its not that hard, but I have a System.Reflection.PropertyInfo object. I want to set its value based on the result of a database lookup (think ORM, mapping a column back to a property). My problem is if the DB returned value is DBNull, I just want to set the property value to its default, the ...

How best to use XPath with very large XML files in .NET?

I need to do some processing on fairly large XML files ( large here being potentially upwards of a gigabyte ) in C# including performing some complex xpath queries. The problem I have is that the standard way I would normally do this through the System.XML libraries likes to load the whole file into memory before it does anything with it...

IIS Module for Blocking Heavy Site Traffic

Question Hello All, A little background on my issue... I currently have a site built for the ISP I work for that displays messages to users based on their billing status. When they are in Non-Pay I display a Non-Pay message and if they are in Abuse, I display an abuse message, etc. The traffic is generated by a Cisco SCE that redire...

.NET application that needs to have built in "Mail Merge" functionality

Is there some way to have the Mail Merge capability in my application? Maybe a MS Word API? ...

Automatically wrap unit tests in DB transaction?

[Edit (Haren): Duplicate] I'm looking for a way to automatically wrap my NUnit integration tests in a DB transaction, so that changes made by the test are automatically rolled back when the test ends. Ideally, I would decorate certain test methods with a custom attribute that would cause NUnit to create a transaction when the test sta...

What to include in a Utility Library

With more and more projects under my belt I find that I am often repeating many common tasks from project to project, client to client. So I have started to assemble a "utility" library, a collection of these common elements that are often repeated from project to project. So far I have utilities to resize images, export data grids to ...

Set Global Variable for Duration of a Request

Can I set some kind of global variable for the length of a single Request, so that all the controls of the page can respond to it without having to pass it through to each of them? For instance, if someone hit a Save button on my MasterPage, could I set something so that each UserControl on my Page can have a Page_Load like: protected ...