Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ALL,

GOOd Morning!!!


at which time 'VerifyRenderingInServerForm()' event called?


Please teel me about that in detail ..


Thanks in Adv.
Posted
Comments
Dean Oliver 30-Jan-12 1:35am    
http://msdn.microsoft.com/en-us/library/system.web.ui.page.verifyrenderinginserverform.aspx
thatraja 30-Jan-12 2:37am    
IMO, you may post it as an answer
Sergey Alexandrovich Kryukov 30-Jan-12 2:39am    
Yes, post it as an answer. If I happen to visit this page again, I'll vote 5, especially if you explain why this is not an event.
--SA
Sergey Alexandrovich Kryukov 30-Jan-12 2:39am    
This is not event, please don't tell something which is not true.
Dean Oliver just gave you the reference.
--SA

Hi Page.VerifyRenderingInServerForm() is not an event but rather a method. It makes sure that any HtmlForm control is rendered for the specified ASP.NET server control at run time. Controls that are required to be inside <form runat=server> tags can call this method before they render so that an error message is shown if they are placed outside the tags. Controls that post back or depend on registered script blocks should call this method in an override of the Control.Render method. Pages that have a different way of rendering the server form element can override this method to throw an exception under different conditions.

as stated in http://msdn.microsoft.com/en-us/library/system.web.ui.page.verifyrenderinginserverform.aspx[^]

C#
// Override the Render method to ensure that this control
// is nested in an HtmlForm server control, between a <form runat=server>
// opening tag and a </form> closing tag.
protected override void Render(HtmlTextWriter writer) {
    // Ensure that the control is nested in a server form.
    if (Page != null) {
        Page.VerifyRenderingInServerForm(this);
    }
    base.Render(writer);
}
 
Share this answer
 
Comments
madhuri@mumbai 30-Jan-12 8:06am    
thanks..
Sergey Alexandrovich Kryukov 30-Jan-12 17:30pm    
I recommend you to accept this answer formally (green button).
--SA
Sergey Alexandrovich Kryukov 30-Jan-12 17:30pm    
This absolutely deserves my credit, so I would vote more than the 5 I promised (if only I could). The answer is complete.
--SA
// Summary:
        //     Confirms that an System.Web.UI.HtmlControls.HtmlForm control is rendered
        //     for the specified ASP.NET server control at run time.
        //
        // Parameters:
        //   control:
        //     The ASP.NET server control that is required in the System.Web.UI.HtmlControls.HtmlForm
        //     control.
        //
        // Exceptions:
        //   System.Web.HttpException:
        //     The specified server control is not contained between the opening and closing
        //     tags of the System.Web.UI.HtmlControls.HtmlForm server control at run time.
        //
        //   System.ArgumentNullException:
        //     The control to verify is null.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900