Several days back I wrote an article Exporting Datagrid to Excel, Word and Text Files. I tried the same technique for the GridView control and was smashed with a silly error saying that GridView control must be placed inside the Form tag with runat server = true. I switched to html view and found that GridView is already inside the form tag with runat = server. I googled it and found that many people are facing this problem and no one has found a solution yet. Microsoft has classified it as a "BUG". Here is a link to microsoft website about this BUG: GridView Export to Excel Bug I just got a direct link that talks about this BUG. You need to override Page.VerifyRenderingInServerForm Method to get it to work. Here is the msdn link which defines this method: GridView Excel Rendering Problem
GridView Export to Excel Problems
New on Geeks with Blogs
- Because of AI, You Need a New Development Team
Your existing team is buried in the complexity of your existing product. AI rewards the team with a blank slate. Most companies don't have one.
- The Offshore Problem That Starts With a "Yes"
The stories about offshore "not working" are rarely about skill. They are about an invisible communication gap, and it starts the moment someone says yes.
- The Focus Five: Five Questions to Know If Your Team Is Actually Making Progress
Almost nobody trains you to be an engineering manager. You were good at writing code, so you got handed more people and more meetings, and one day the job…
- Why Nobody Knows What Engineering Does
At VinSolutions, I was famous for one thing that had nothing to do with writing code. Every single time we shipped a release, I posted about it. On social…
