background preloader

ASP.NET

Facebook Twitter

MVC 4

Creating Custom Configuration Sections in Web.config. By Scott Mitchell Introduction Most ASP.NET applications include a number of configuration settings, such as connection strings, mail server settings, system-wide default settings, and so forth. While these settings could be hard-coded in the source code, it's usually a wiser idea to place them in a configuration file, such as Web.config. The reasoning being that if these values need to be modified, editing a configuration file is a lot easier than updating the code, rebuilding, and re-deploying.

We can define custom configuration sections in Web.config that conforms to a pre-determined XML schema. In Creating Custom Configuration Sections in Web.config we examined a technique for parsing the XML in custom configuration section that works in both ASP.NET 1.x and 2.0 applications. Custom Configuration Section Basics Creating the Configuration Class To use the .NET 2.0 configuration API, all we need to do is create a class that derives from the ConfigurationSection class. Using jQuery with ASP.NET - A Beginner's Guide. Posted by: Suprotim Agarwal , on 11/18/2008, in Category jQuery and ASP.NET Abstract: This article is a guide for getting started with jQuery using ASP.NET and Visual Studio 2008/2010. The article also shows you how to use Visual Studio intellisense feature to develop jQuery and ASP.NET applications. Using jQuery with ASP.NET - A Beginner's Guide Did you hear about jQuery..

NO...? Ok, the million dollar question - What is jQuery anyways? jQuery is a fast, lightweight JavaScript library that is CSS3 compliant and supports many browsers. What is the difference between JavaScript and jQuery? JavaScript is a language whereas jQuery is a library written using JavaScript. Where can I download jQuery? The version of jQuery as of this writing is jQuery 1.2.6 and can be downloaded from here.

[Update 2] Instead of downloading the jQuery files, you can also reference the files directly using a Content Delivery Network (CDN). Microsoft also provides jquery over CDN. Show me some examples // add code here. ASP.NET Page Life Cycle Overview. When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. It is important for you to understand the page life cycle so that you can write code at the appropriate life-cycle stage for the effect you intend.

If you develop custom controls, you must be familiar with the page life cycle in order to correctly initialize controls, populate control properties with view-state data, and run control behavior code. The life cycle of a control is based on the page life cycle, and the page raises many of the events that you need to handle in a custom control. This topic contains the following sections: In general terms, the page goes through the stages outlined in the following table. Some parts of the life cycle occur only when a page is processed as a postback. Reference Concepts Other Resources. ASP.NET 2.0 page and control life-cycle diagram - Justin's Blog. I recently had to begin working on some ASP.NET development, specifically composite controls for web forms and SharePoint custom fields and web parts, and not knowing a great deal about ASP.NET (or SharePoint for that matter), I set out into Google land to discover all I could about the ASP.NET page request and how my snazzy new controls would have to fit into it.

I found lots of useful information, and in the end wanted a nice diagram of the page and control life-cycle to stick on the wall at work. However I couldn’t find a complete, accurate and nice looking diagram which showed me all the methods I could override, and all the events I could handle (and their place in the scheme of things). The best I found was an image credited to Léon Andrianarivony in a blog post by Kris here (you’ll find it in many other posts as well if you do a quick search in Google) .

After taking another look around I came across this post by Tim. Here is a snippet from my code used to generate the trace: ASP.NET Tutorial.