VerifyRenderingInServerForm override with a UserControl derived page

Hi Experts,

I have inherited a web site to fix, so I can't change too much of it. I have to add an ability to export the gridview to excel. I have to override VerifyRenderingInServerForm in order to make this work (or do you have a better solution to this: http://aspalliance.com/771) but I'm getting the error:

'WebControl_EditAccountLogic.VerifyRenderingInServerForm(System.Web.UI.Control)': no suitable method found to override

The page derives System.Web.UI.UserControl, and I suspect this should be System.Web.UI.Page in order to override VerifyRenderingInServerForm.. Is that correct?

If that's the case, then how do I make this export to excel functionality work on this page? (Code attached)

Thank you! As ever super duper urgent. :)

rss2

exporttoexcel.txt
rss2Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NazoUKCommented:
Can't you just override VerifyRenderingInServerForm in the page that hosts the user control?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HashmathCommented:
Hi ,

I too have the same issue with form tag. I have a custom webpart ( Visual Webaprt, its an .ascx file) that has a grid and a tree view. Now on click of an image button I need to export the contents of a grid to excel.
I am not able to override the method VerifyRenderingInServerForm because I am using a Visual webpart in sharepoint 2010. I am not able to find the codebehind of the webpage that is holding this webpart.

Can you please help me in this. I have been trying to do that from hours.

Greetings,
Sameena
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.