Category Archives: Microsoft .Net Framework

Stop asp.net from encoding the source HTML string (mvc raw html)

/// Stops asp.net from encoding the source HTML string. public static IHtmlString HTMLRaw(string source) { return new HtmlString(source); } call this function whenever you want asp.net NOT to encode the string. Note: You can use <%= and %> tags to … Continue reading

Posted in ASP.Net, C#.Net, Microsoft .Net Framework | Tagged | Leave a comment

How to Add/Update/Remove Application Configuration (App.Config) Keys

14/05/2013 How to add new keys to app.config file? Simple, just use this code. When you execute this code, a new key will be added to your configuration file and the given value will be set for it. Important: This … Continue reading

Posted in C#.Net, Microsoft .Net Framework | Tagged , , , , , , | Leave a comment

Using Regular Expressions With Find And Replace In .Net IDE

06-06-2012 Use any regular expression to make your match. Then use {} pairs to define blocks of the search string you want to use in the Replaced string. Example: following find and replace strings will replace all occurrences ” report(number) … Continue reading

Posted in Microsoft .Net Framework | Tagged , , , , | Leave a comment

File Reference vs. Project Reference in .NET

31-05-2012 File reference is when you add reference to a dll file. This is what you do when you have to use a 3rd party dll. The project reference is when you load a project into your solution and then … Continue reading

Posted in Microsoft .Net Framework | Tagged , | Leave a comment

Comparing Objects in .Net – Reference Equality

30-05-2012 Comparing two objects returns true if they point to the same entry of the heap. Menol ILT

Posted in C#.Net, Microsoft .Net Framework | Tagged , | Leave a comment

Cannot Find Contents Of System.Configurations?

29-05-2012 The visual studio shows the System.Configurations namespace by default. But it doesn’t show that namespace content (such as System.Configuration.Configuration class) by default. You have to add a new reference to System.Configurations namespace explicitly. This is more confusing as it … Continue reading

Posted in C#.Net, Microsoft .Net Framework | Tagged , , , | Leave a comment

How to Save a Copy of a Visual Studio 2005 Solution

2008-12-22 Sometimes things we consider as simple take much time to be accomplished than we expect just because we forget! Today I wanted to save a copy of a web based visual studio 2005 solution but it took life 10 … Continue reading

Posted in Microsoft .Net Framework | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment