J
jm
I have/had a form for entering new data with a submit button. Works
great (in .net). Now, I want to populate those same textboxes with
data from a selected list on another page (from querystring). So, I
put those textboxes that I used to enter data initially, wrapped with
a datagrid, and whamo, I can no longer reference textbox.text with
anything. I figure I just have the whole model on this wrong (was
used to response.write recordset("column") you know the rest).
So, I decided to use an example from MSDN with the edititemtemplate.
It works. I can update,delete,cancel from the datalist they use, but
I am doing so only for data that, of course, already exists. What if
it is the initial creation of the record? How do I use this same form
that lets me view, update, delete, and cancel as an empty form for
INSERTing data into my database? When I try to simply run the page
with no data bound to the datalist, nothing renders at all, just blank
page.
Here is the example, it is straightforward; I simply replace the in
memory data with database values. Thank you for any help.
It is the VB example:
http://msdn.microsoft.com/library/d...ontrolsdatalistclassedititemtemplatetopic.asp
great (in .net). Now, I want to populate those same textboxes with
data from a selected list on another page (from querystring). So, I
put those textboxes that I used to enter data initially, wrapped with
a datagrid, and whamo, I can no longer reference textbox.text with
anything. I figure I just have the whole model on this wrong (was
used to response.write recordset("column") you know the rest).
So, I decided to use an example from MSDN with the edititemtemplate.
It works. I can update,delete,cancel from the datalist they use, but
I am doing so only for data that, of course, already exists. What if
it is the initial creation of the record? How do I use this same form
that lets me view, update, delete, and cancel as an empty form for
INSERTing data into my database? When I try to simply run the page
with no data bound to the datalist, nothing renders at all, just blank
page.
Here is the example, it is straightforward; I simply replace the in
memory data with database values. Thank you for any help.
It is the VB example:
http://msdn.microsoft.com/library/d...ontrolsdatalistclassedititemtemplatetopic.asp