This isn't so much a question as to more of a quick tip on some issues I had with my GridView export to Excel..
So I was having the problem that when I exported a GridView to excel spreadsheet, the spreadsheet was essentially blank however strangely enough a couple fields were filled with a tad bit of html (
<div>, </div>).. I couldn't really figure out why that was happening but I stumbled upon a link which fixed my issue:
So for my solution I just added the
EnableEventValidation=False in the top of my form and I neglected to add the bit of
Me.EnableViewState = False in the behind code. This worked for whatever reason..
Question: Could someone explain what the heck is going on? I feel like every time I get something working with Asp.net it feels like I am mostly just exploiting bugs in the framework to get code working as opposed to using a logical flow like other frameworks I've used.. I still don't understand how something like this can just 'magically' work now and I have know understanding of the reasons why.
It's like if I were to program: A is in B and B is in C.. Therefore A is in C.
Case 1: RoR: Ok, A is in C, your right mr. programmer, I get it. Me: Yay, ok on the the next task..
Case 2: Asp.net: Must set inheritor for object C.. see stacktrace...etc Me: oh.. hmm ok I'll google that error:.. 45 min later.. Oh here is something weird that doesn't contain any useful docs... I'll try that. Oh it works! Yaay, but lame. I dun get it.
preguntado el 31 de enero de 12 a las 16:01