Error in export gridview to excel
I was tring to export gridview to excel.For that I wrote the code in content page.But I got the error.When I writting attribute[runat]="server";So I searched on the net I wrote like this.
public override void VerifyRenderingInServerForm(Control control)
{ /* Confirm开发者_如何学运维s that an HtmlForm control is rendered for the specified ASP.NET server control at run time. */
}
.But I remove all the code from my page.But When I am running the page it get display on the login page.I want to remove that sentence which is coming at run time.
I have one master page and remaining content page.The login page is not content page, is a simple aspx page.In my master page there is form tag.In a One of my content page,I added code for export to gridview.
HtmlForm frm = new HtmlForm();
frm.Attributes["runat"] = "server";
So got the error.I searched on net for the error ,ppl was saying to use the method ,so I wrote that method.
public override void VerifyRenderingInServerForm(Control control)
{ /* Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. */
}
But problem was when I was running my project the code get display on my login page not remaing content page.So I removed all code and even that override method, still code get printed on my login page.I looked into login page for finding out that method get defined there.But there is no such method in login page.What should I do?How to remove that.
精彩评论