.net

Dynamic Compiled Plugins in .NET

Hi, Is there a possibility that I can put some of my code in non-compiled form with my application and then make changes to it on the fly and the application can then just use the new version onwards? If it is possible (which i secretly know it is using CodeDOM), are there any issue to watch out for using this approach for pluggability...

asp.net web-forms commandargument problem

I got a problem with a button control in asp.net webforms. After using mvc a bit i started using foreach in the aspx files in webforms too, instead of repeaters, mostly cause of all the junk viewstate a repeater creates. It works great when you just iterate over html controls. But i got a hard time with button controls. <% foreach (va...

vs 2008 javascript intellisense in XML file problem

I am trying to get javascript intellisense to work for jQuery in a .xml file. I've already used a custom XSD to provide intellisense for the XML. Under the tag, I have a mixture of HTML and javascript which are enclosed by . And it is all greyed out so no intellisense there. Adding a /// does not help as well. I would really like to ...

What are the correspondent of Servlet and Applet in .NET?

I am trying to understand what's the correspondent of servlets and applets in .NET but I don't have much experience in JAVA. I am thinking applets could be compared to the silverlight stuff, meaning you code independently from the browser, but then it's not like that since (between other things) you can re-use an applet outside the brow...

Is there a way to have the c# compiler display warnings when a switch statement do have unhandled cases ?

Consider the following code : private enum myEnum { A, B } private void myMethod(myEnum m) { switch (m) { case myEnum.A: //do stuff break; case myEnum.B: //do stuf...

Using Case/Switch and GetType to determine the object

If you want to switch on a type of object, what is the best way to do this? Code snippet private int GetNodeType(NodeDTO node) { switch (node.GetType()) { case typeof(CasusNodeDTO): return 1; case typeof(BucketNodeDTO): return 3; case typeof(BranchNodeDTO): return 0; ...

Best approach for web application returning only XML?

I am building a web application which will generate XML from a database based on a specific schema and depending on certain input parameters (such as dates or search terms) carried on a querystring. Is the best approach to write a web service which returns the required XML or to write an ashx handler that outputs the XML? Am I able to ...

Visual Studio Class Diagram not showing relationships

When I define my class properties with out using fields (which was enabled with C# 3.0), class diagram is not showing my one to one/many relationships. Inheritance is visible in the diagram though.. Is there a way to fix this? ...

Best way of upgrading .NET windows controls to WPF controls?

We are about to upgrade a C# windows application (1.1) to WPF from windows controls (3.5). Do you have any suggestions on where to start Any tips & tricks? What to avoid? The window controls (1.1 .NET) are present in a separate project within the solution together with our "entrypoint" and "process controller" for the application. ...

Showing reports and ledgers

Hi all, I was using Microsoft Office Web Components in my .NET desktop application to show tabular data and reports. But Microsoft has stopped shipping Web Components with later versions of Microsoft Office and also I want to remove this dependency from my application. Is there any other good and efficient method to show reports and ta...

Cruise control.NET to ignore changes in some local folders?

hi, Thanks for the great help u had done .Infact i was now able to detect modifications in my local folder itself.But now i face another bottleneck. When my cruise control.NET detect any modifications in my source files it starts building and it checks by polling every 60 seconds. Now the results of the build files are getting popula...

Automate deployment of asp.net mvc site

Currently I build my websites on my machine, deploy them to a test machine to see if they still work there and then have to request the sysadmin to deploy them to the qa/production servers. Time after time that what should be my moment of pride is killed by some deployment procedure that was misunderstood, forgotten or not documented. Cu...

Changing a background colour of datagrid row dynamically

Hi, I want to change the background colour of a row in a datagrid dynamically depending on some value in Form_Load function. I am using c#.net windows application. I am having the code.. for (int i = 0; i < 10; i++) { Datagrid1.Rows[1].Cells[i].Style.BackColor = Color.Khaki; } Is there any other way of doing this without any lo...

WCF Authentication

Hi We're building some core services in .Net 3.5 and exposing the services via WCF. The services will only be accessed internally (i.e. within the intranet). The services just need to authenticate the calling user's windows credentials and get their AD/functional groups. The serives need to be exposed using NetTcpBinding and BasicHtt...

Switching Between Using NUnit and MSTest for Unit Testing

How can I configure a .NET solution (C#, .NET 2.0) to to allow other developers to make use of the same unit tests for the solution using either NUnit or MSTest? Background: In this project, some developers use VS2005 Team Edition, and others make use of VS2005 Pro, so not all of the developers are able to run MSTest. Given that this...

Remove title bar text of a window but keep status bar text

I am working with Windows Forms, is it possible to create a window which has text in the status bar, but has no text in the title bar at the top of the application? (Largely because the standard title text which prints on my Aero glass I have implemented looks terrible as it's too high and I am drawing my own text title and obviously don...

How to serialize big objects in .NET? (OutOfMemory Exceptions)

I'm using serialization for "save" feature in my application. But when the data is too big (15+ MB) I'm starting to get OutOfMemory exceptions. I've got so many objects and they are connected with other little objects, I think this is causing too much processing power and data held in the memory. My code is based on this, almost same: ...

Progress Bar not updating

I have the following piece of code to write data to an XML file. private void WriteResidentData() { int count = 1; status = "Writing XML files"; foreach (Site site in sites) { try { //Create the XML file StreamWriter writer = new StreamWriter(path + "\\sites\\" + si...

Checkbox in Datagrid header ClientID (JQuery)

Within a masterpage I have a standard DataGrid: <asp:DataGrid ID="dgMyGrid" runat="server" AutoGenerateColumns="false"> <Columns> <asp:TemplateColumn> <HeaderTemplate> <asp:CheckBox CssClass="Checker" ID="cbSelectAll" runat="server" /> </HeaderTemplate> <ItemTempl...

Is MEF OSGi for .NET?

I'm just trying to get my head around the Managed Extensibility Framework (MEF) at the moment and digging into a bit. I have an Eclipse background so in my brain I currently have the equation: MEF =~ OSGi for .NET Based on what I have heard so far. Am I on the right lines? ...