Hi there,
Once i am on my second page where i have open the record from the database with my id record, how can i populate my textboxes with the values of my record?
And ho can i populate a select with another table containig the type of user by id? (ex. Admin, norm user, low user etc)

thanks

Recommended Answers

All 2 Replies

if you have multiple textboxes, you may want to consider using one of the web controls instead. It is going to save you a lot of work. For example, its common on page one to use a gridview. Then on page2, you can use a "detailsview" control. This control can be used with default controls such as labels (item template) or textboxes (edit template), but you can convert the templates to custom and use any controls you wish.

If you do this in design view rather than code behind, you can do all of this without writing one line of code. Its quite easy once you learn how to do this.

here is a popular tutorial that atually goes over the gridview/detailsview combniation. Some people use both controls on the same page, but they can be on different pages. The difference is how the parameter is passed from the gridview to the details view.

http://msdn.microsoft.com/en-us/library/aa581796.aspx

This tutorial is perfect!!!

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.