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
- Your Customers Build the Features Now
I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.
- Get the Size of a Directory in Linux the Easy Way
du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.
- Vim Search and Replace: The Ultimate Guide
One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.
- 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.
