Posts

Showing posts from February, 2012

The difference between Break & Continue

Image

Regular expressions: How can I replace something within some tag?

Question How can I replace something within some tag for e.g. if I want to replace something within this tagthis is a test . I want the output which is  something . Answer The solution is very simple. First, you have to match an opening tag: \]#\> Here, [^\>]# matches any text after the tag name (attributes, values) until the closing > is reached. Then, match tag inner text: [^\<]# which matches the tag inner text until the opening < is reached. And the closing tag: \<\/tag_name\> The full search expression with () to store tags: (\]#\>)[^\<]#(\<\/tag_name\>) Now, the replace expression:

Implementing INotifyPropertyChanged interface in your class with the help of an event

This is not just the simple how to tutorial. Just wanted to bring the though process as how to implement such things when you get to solve the real world problems at hand.

So just thought to create a sample application that will help me understand how and when we can use INotifyPropertyChanged interface to notify the clients about the happenings in our class.

Download and see the code for  your self. The code is pretty self explanatory with proper steps and comments.

Regards,
Kritul

Pre-Compiling ASP.NET Application to avoid first-time lag to the end user’s browsing experience.

Because of the mechanics of the ASP.NET Request Handling process, if you make changes to your .aspx code-behind pages, you must recompile your application. This can be quite a pain if you have a larger site and do not want your end users to experience the extreme lag that occurs when an .aspx page is referenced for the first time after compilation. Consequently, many developers have created their own tools that automatically hit every single page within their application to remove this first-time lag hit from the end user’s browsing experience.
ASP.NET provides a few ways to precompile your entire application with a single command that you can issue through a command line. One type of compilation is referred to as in-place precompilation.
To precompile your entire ASP.NET application, you must use the aspnet_compiler.exe tool that comes with ASP.NET. To get to this tool, you will need to navigate to it using the Command window. From the Command window, navigate to 
C:\Windows\Microsoft.NET…