Posts

Showing posts from 2011

Count down timer in asp.net

We can display the count down by using timer control or by using the java script. Timer control will repeatedly call the post back on every tick, which will decrease the performance of the site. It’s better to use the java script. Following is the code for implementing the Count Down:- Test.aspx: < asp : Label ID ="lblTimer" runat ="server"></ asp : Label > Write this line in body, if it is simple one page site. If you have master page the write above code in the asp : Content. Script:- On the same page write following script:- This script will update the time and on label and calculate the time in Hours, Minutes, and Seconds. < script type ="text/javascript" language ="javascript">       var timeout = "<%= Session.Timeout * 60 * 1000 %>" ;       var lbltimer = document.getElementById( "<%= lblTimer.ClientID %>" );       debugger...

Execution Process of MVC Application

When we execute the MVC application it will process in the following steps: 1) Receive first request for the application:- In the Global.ascx file, the route of application is decided, by adding the route object in route table . 2) Performing Routing:- The URLRoutingModule uses the first matching Route object in the route table collection, which is uses to crate a Request Context object 3)  Create MVC request handler:-  The MVCRouteHandler object create an instance of the MVCHadler class and passes it the RequestContext instance. 4) Create Controller:-   The MVCHandler oject uses the RequestContext instance to identify Controller 5) Execute Controller:- The MVCHandler instance call the controller execute method. 6) Invoke Action:- The ControllerAcctionInvoker object is associated with the controller determine wwhich action method of the controller class to call and then call the method. 7) Execute Result:-  A typical action method mig...

Introduction to MVC

Image
MVC i.e. Model View Controller is the wed based application, it’s a Microsoft product. It’s a new technology that boom in market. Till now Microsoft release the three version of MVC: MVC 1.0                in year 2009 MVC 2.0                in year 2010 with .Net framework 3.5  MVC 3.0                in year 2010 with .Net framework 4.0 To use MVC 2.0 in your computer, laptop you need to install the relevant development tool on your computer. You need either of following:    Visual Studio 2010 any edition by default the MVC 2 is include Visual Studio 2008 with SP1 any edition, it does not include ASP.NET MVC 2 by default you must download and install MVC 2 application from www.asp.net/mvc/ The Following diagram explain you the concept of Mode-View-Controller...