Posts

Showing posts from November, 2010

The Page Life Cycle of an ASP.NET and its controls.

Image
The life cycle starts when a user requests a web page through his/her browser. The Web server than process the page through a sequence of steps before response is sent back to the user's browser. The steps are as: Page Request Start Page Initialization Load Validation PostBack Event Handling Render Unload Page Request The page request occurs before the page life cycle begins. When a user requests the page, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page. Start In the start step, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. Additionally, during the start step, the page's UICulture property is set. Page Initialization During page initialization, controls on

Registration and Email Verification for New Accounts

In This Code i am Providing the code by which the user can easily registered to the Website and the E-Mail is sent to the user for the Verification. If the user will not verify his/her email,the account is not activated and that person cannot login. Here are the Following Steps to achieve that:- 1.Create new Web application and make one form in which the user can register and add the following code to the source code:       //Send email to user for verifying account         CreateUserWizard cuw = (CreateUserWizard)sender;         MembershipUser user = Membership.GetUser(cuw.UserName);         Guid userId = (Guid)user.ProviderUserKey;         System.Net.Mail.MailMessage EmailMsg = new          System.Net.Mail.MailMessage("info@ask.com",             CreateUserWizard1.Email);         EmailMsg.Subject = "Email Verification fromhttp:dinesh-itsolutions.blogspot.com/";         EmailMsg.IsBodyHtml = true;         EmailMsg.Body = "Thanks for registering w