Guidance from classic ASP to ASP.NET help needed

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
 
J

j m

I am beginning to think I need a form with textboxes and all that to
enter the data and on the same page have the datalist when viewing the
entered data.

I could have them visible or invisible depending on what the user is
doing (Adding or viewing, updating or deleting).

Is this counter intuitive to the asp.net design?

Thanks.
 
J

jm

j m said:
I am beginning to think I need a form with textboxes and all that to
enter the data and on the same page have the datalist when viewing the
entered data.

I could have them visible or invisible depending on what the user is
doing (Adding or viewing, updating or deleting).

Is this counter intuitive to the asp.net design?

Thanks.

Any wisdom?
 
K

Kevin Spencer

Is this counter intuitive to the asp.net design?

Not necessarily. The real question is not whether it's good asp.net design,
but whether it's good application design. And depending on what you're
putting into the page, and what it all does, it may indeed be good design.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top