Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update/Insert New Record asp.net

Status
Not open for further replies.

asafb

Programmer
Jun 17, 2003
80
US
Hello, I've been reading how to insert/update using a single page, but I've got a lot of records. Here's what I want:

You hit a link called "Add new record."
Then it takes you to a new page with a simple form.
Let's have just two fields: Name, Telephone.
You hit add record and it inserts it in to the database.
Now, you go to a page where you see all the records in a grid using the datagrid control or datalist, to the right you see a hyper link called "EDIT"
when you hit "Edit", i want it to LITERALLY go to a *new* page where you see the form again, but this time the form shows the values of the record you're editing. I don't like the approaches I've seen where it's on the same page. I have 30 fields, anyway to do this? Thank you very very much for your help! I did this successfully in ASP classic, now i need the same simplicity in .NET
Sincerely ab

EXAMPLE:

Name: [TEXTBOX]
Phone: [TEXTBOX]

ADD NEW RECORD

then, for editing:

Edit the record:

Name: [TEXTBOX] (Populates the current value)
Phone: [TEXTBOX] (Populates the current value)

EDIT THE RECORD
 
If I were you, I'd use an editable datagrid. It's much easier than coding 3 pages. Here's a link for the tutorial.


Also, if you're going to sucessfully make the transfer from ASP to ASP.net, I'd suggest you adopt the programming models that .NET exposes. You'll be writing less code and taking advantage of object-oriented design.

HTH,
Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top