Life cycle when the page processed during a postback The events associated with the relevant page cycle phases are: Page Initialization: Page_Init View State Loading:LoadViewState Postback data processing: LoadPostData Page Loading: Page_Load PostBack Change Notification: RaisePostDataChangedEvent PostBack Event Handling: RaisePostBackEvent Page Pre Rendering Phase: Page_PreRender View State Saving: SaveViewState Page Rendering: Page_Render Page Unloading: Page_UnLoad The processing sequence in which a page is processed during a postback event is: Initializing: During this phase, the server creates an instance of the server control Loading view state: During this phase, the view state of the control posted by the client is reloaded into the new instance of the control. Loading : During this phase, the instance of the control is loaded onto the page object in which it is defined. Loading the postback data : During this phase, the server s...
Back to Home ASP.NET MVC 1.0 | .NET Framework : 3.5 | Visual Studio: 2008 Released on 13 March 2009 WebForm View Engine HTML Helpers View Data URL Routing Partial View Action Filters ASP.NET MVC 2.0 | .NET Framework : 3.5 & 4.0 | Visual Studio: 2008 & 2010 Released on 10 March 2010 Data Annotation Async Controller ASP.NET MVC 3.0 | .NET Framework : 4.0 | Visual Studio: 2010 Released on 13 January 2011 Razor View Engine View Bag ASP.NET MVC 4.0 | .NET Framework : 4.0 & 4.5 | Visual Studio: 2010 & 2012 Released on15 August 2012 WebAPI Bundling & Minification DB Migration Mobile ASP.NET MVC 5.0 | .NET Framework : 4.5 & 4.5.1 | Visual Studio: 2013 Released on17 October 2013 Bootstrap ASP.NET Indentity Back to Home
Method 1: Response.AddHeader To Refresh Web page After every 5 Seconds You can add following code, Response.AddHeader("Refresh", "5"); Cricket Sites, Stock Exchange sites use similar logic :) Method 2: In body Tag, window.setTimeout The 1000 = 1 Second... < body onload ="window.setTimeout('window.location.reload()',1000);" > Method 3: In Meta Tag Theres also a meta tag that you can define on the head, but not sure wheter it refreshes even if the content has not finished loading or if it starts counting when the head section loaded. Code would be something like that: < meta content ="600" http-equiv ="refresh" > Method 4: Timer Control : Microsoft ASP.NET 2.0 AJAX Extensions server control In following example, the timer interval is set to 10 seconds <%@ Page Language="C#" AutoEventWireup="true" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN...
Back to Home Model-View-Controller (MVC) is a software architecture pattern. Originally formulated in the late 1970s by Trygve Reenskaug as part of the Smalltalk, MVC architecture works on code reusability and separation of concerns. It was originally developed for desktop Then adapted for internet applications. The Model is the application object, the View is UI presentation, and the Controller defines the way the user reacts to user input from UI. MODEL: - Set of classes that describe the data we are working with - Rules for how the data can be changed and manipulated - May contain data validation rules - Often encapsulate data stored in a database as well as the code used to manipulate the data Most likely a Data Access Layer of some kind VIEW: - Defines how the application’s user interface (UI) will be displayed - Support master views (layouts) - Support sub-views (partial views or controls) - Web: Template to dynamically generate HTML CONTR...
I was facing some issue to update excel cell which was depended on some formula, I need to change 'Comparison_Rate_Calculator' by Programming and need to read Calculated value by formula '=+HLOOKUP(C3,Workings!$D$1:$AJ$2,2,FALSE)' over 'Comparison_Rate_Calculator_Values' column. I didn't get calculated value even i was able to change 'Comparison_Rate_Calculator' column's value. So I got solutions by refreshing Excel WorkSheet and Here is the Solutions. File: Web.Config < connectionstrings > < add name = " xls " connectionstring = " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\AshvinWorkspace\POCs\ReadExcelSheet\ReadExcelSheet\Files\HLComparisonRateCalculator.xls;Extended Properties=Excel 8.0 " > </ add > </ connectionstrings > File: Default.aspx.cs public partial class _Default : System.Web.UI. Page { protected void ...
Back to Home Execution Stages: For web: HTTP request for Application Incoming request routed to Controller (Perform Routing) The controller processes request and create presentation Model The controller also selects appropriate result (view) Model is passed to View View transforms Model into an appropriate output format (HTML) The response is rendered (HTTP response) Image Courtesy: SlideShare.net Back to Home
Applying Dynamic Themes to Web Page (.aspx) in ASP.NET Themes and Skins. The themes and skins features in ASP.NET 2.0 allow for easy customization of your site's look-and-feel. You can define style information in a common location called a "theme", and apply that style information globally to pages or controls in your site. Like Master Pages, this improves the maintainability of your site and avoid unnecessary duplication of code for shared styles. protected void Page_PreInit( object sender, EventArgs e) { Page.Theme = Session[ "Theme" ] as string ?? "Theme1" ; } protected void Page_Load( object sender, EventArgs e) { } protected void Button1_Click( object sender, EventArgs e) { if (Session[ "Theme" ] != null ) { if (Session[ "Theme" ].ToString() == "Theme1" ) Session[ "Theme" ] = "Theme2" ; else Session[ "Theme" ] = "Theme1...
Abstract Class : The class which cannot be instantiated is known as an Abstract Class . So an object of it cannot be created. Hence it must be inherited. Can't be instantiated. Must be inherited. It may have Concrete Methods & Abstract Methods. An Abstract Class can have only Abstract Method. An Abstract Method must be overridden. public abstract class AbstractA { public abstract string AbstractProperty { get ; set ; } public abstract void AbstractFunction1(); public virtual void AbstractFunction2() { Console .WriteLine( "AbstractA : AbstractFunction2()" ); } public void AbstractFunct...
1. Clas s is Reference types and Structure is Value type. 2. Clas s supports an Inheritance where as Structure not. 3. Classes are usually used for large amounts of data, whereas Structure are usually used for smaller amount of data. 4. When we instantiate a class, memory will be allocated on the heap and when Structure gets initiated it gets memory on the stack. 5. Classes can have explicit parameter less constructors. But Structure doesn't have this. 6. Classes can be garbage collector because garbage collector works on heap memory . structures can not be garbage collector so no memory management.
Comments