Monday, January 28, 2013

ASP.NET Questions and Answers - Part 2

How can we prevent browser from caching an ASPX page? 
Use the SetNoStore method of the HttpCachePolicy class to direct the client not to store the responses in its history. See http://msdn.microsoft.com/en-us/library/system.web.httpcachepolicy.setnostore.aspx

In which event are the controls fully loaded?
On Load event. (http://msdn.microsoft.com/en-us/library/system.web.ui.page(v=vs.100).aspx
The Page object calls the OnLoad method on the Page object, and then recursively does the same for each child control until the page and all controls are loaded. The Load event of individual controls occurs after the Load event of the page.
Use the OnLoad event method to set properties in controls and to establish database connections.
(http://msdn.microsoft.com/en-us/library/ms178472(v=vs.100).aspx)

How we can force all the validation controls to run?
Using Page.Validate() method to instructs any validation controls included on the page to validate their assigned information.
Read more at http://msdn.microsoft.com/en-us/library/0ke7bxeh.aspx

What is .ASCX file?
.ascx file is a user control file.
Read more at http://msdn.microsoft.com/en-us/library/26db8ysc(v=vs.71).aspx

Related posts:

No comments:

Post a Comment

How to recognize a fake Geek Squad renewal scam | Consumer Advice

Except from  https://consumer.ftc.gov/consumer-alerts/2022/10/how-recognize-fake-geek-squad-renewal-scam Scammers are at it ag...