Geeks With Blogs

News
Google

Aaron Li's Blog Write it down before I forget May 2007 Entries
Page Life Cycle In ASP.NET 2.0
Page Life Cycle In ASP.NET 2.0 Stage Event What To Do What Done Initialization Page PreInit - change themes, master pages - access properties for a profile master pages, themes, etc. are applied Control Init Page Init - read or initialize properties of controls in the control hierarchy. - add dynamic controls that need to utilize view state Controls are initialized with declarative properties. Page InitComplete - access controls on the page Begin to track view state changes Page Load Page PreLoad ......

Posted On Sunday, May 27, 2007 5:16 PM

View State and TextBoxes, CheckBoxes, DropDownLists
View State and TextBoxes, CheckBoxes, DropDownLists There is a common misunderstanding among developers that view state is somehow responsible for having TextBoxes, CheckBoxes, DropDownLists, and other Web controls remember their values across postback. I was one of them. This is not the case, because the values are identified via posted back form field values, and assigned in the LoadPostData() method for those controls that implement IPostBackDataHandler. See Scott Mitchell’s article for detail. ......

Posted On Sunday, May 20, 2007 4:20 PM

While Custom Validator Does Not Fire
Custom Validator Does Not Fire I have code like this, <asp:TextBox ID="txtEmailBody" Runat="server" /> <asp:CustomValidator ID="valEmailBody" Runat="server" ControlToValidate=" txtEmailBody " Display="None" OnServerValidate="Validate_... " ErrorMessage="*" /> CustomValidator event does not fire if the validated control is empty. If the validated control is a required field, it is easy to fix this problem by adding a RequiredFieldValidator control in addition to the CustomValidator. ......

Posted On Friday, May 11, 2007 1:29 AM

Copyright © Aaron Li | Powered by: GeeksWithBlogs.net