I have a web application that shows a controls group based on a result set from a database.I don't know how many controls do I have to create and I don't know what kind of control will it be. I know that the problem is that I create the controls in the Page_Load.
How do I grab the new values from these textboxes and proceed further?
Description: An unhandled exception occurred during the execution of the current web request.
It seems like the Java Script can get mangled otherwise.
If you are using command buttons, then do not use Auto Generate Edit Button.
Please review the stack trace for more information about the error and where it originated in the code. Format Exception: String must be exactly one character long. i find it hard to understand that since you do not have template fields, and you are using bound fields, there is no way possible that parsing it into a textbox would work, considering there is no textbox(es) in your gridview to being with.
i get that you're are just taking the "text" from the imaginary textbox in your gridview, and putting it into a string. also throw a breakpoint on your Update Method to see what the variables are holding when passing in.
I believe that databinding on every postback is the cause but that's not something that I can change right now, same goes with the autogeneratedcolumns setting.
I'd like to know if there are any other ways to retrieve the new values?
-Frinny Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? It's quite common that people create the data source and bind this source to the Grid View in their Page_Load() method.
What happens with this is that the source is being created every time the user submits the page.
But I think I can´t avoid to do this, because if I don't, the runtime created controls fade away.