Need to pre-fill in a form (including text fields) from database

G

Guest

Hi --

I'm creating a form in ASP.NET 2.0 (and I'm brand new to .NET). And if the
person is new, then I want a blank form to appear and the person will fill
all that info in. This works!

What I'm having trouble with is if the person is an existing member of the
site and wants to change their info. I want to have the same form as the new
member sees but I want all the fields (text boxes, drop downs, etc.) to be
pre-filled in with their info from the SQL database. The form is mostly text
boxes.

I'm pretty sure I know how I'd do this in ASP (classic) 3.0, but that's not
working in .NET 2.0.

Btw, if it matters, I'm using VS 2005 and SQL 2005 (with the database table
name being "Customers".

Can someone please help me? Point me in the right direction please?

Thanks.
 
G

Guest

When a user is registered provide him a link to edit his profile, so that we
get a id to handle database.
now on the page check that id in querystring is not null,
then call a function or write the coding in the page load.
fill all the text box and others.

in case of buttons take a edit or save button and keep it invisible in
starting,
when id is not null make it visible and make Submit or add invisible(which
was in case of new)
 

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

Top