Wednesday, January 20, 2010

Define server control and explain in asp.net?

no links plzDefine server control and explain in asp.net?
A server control is an object that is managed, controlled, and rendered by the server. Server controls always contain the runat=';server'; attribute.





like:


%26lt;asp:Button id=';button1'; runat=';server'; Text=';Click me!'; OnClick=';submit';/%26gt;





Having this ';runat=server'; attribute will tell asp.net that this control can be controlled in your code (you can set the label of the button above in your asp.net code). It will also tell it that things like viewstate/etc is being tracked (so that once you change the label it will stay changed even after the next postback). ... and it also will cause the object to be rendered to HTML (by using code that implements the server control) rather then just output as normal text/html.Define server control and explain in asp.net?
server controls are something that executes on the server side like the validation controls. which makes a call to the server and gets the reply back and shows the error (if any) in client.





some server controls can be implemented in client side as well that will not make a call to the server instead it will validate the process in the client side and provide you the result (JavaScript validation)





Hope this helps...





cheers

No comments:

Post a Comment