简体   繁体   中英

How to display one selected record using DetailView?

I have a form in ASP.Net Visual Studio that asks for particular details. After the user inputs their details into the database, I then want to be able to view their records and edit it in a different webform.

How can I view that one selected row of records in my form instead of viewing the entire database table?

I thought of using DetailView, however it still shows all the records in the database (just only one at a time).

Then I thought of using sessions but I don't know how about doing this?

Could I possible create a text box to input the persons username (primary key) and then that will open their details?

Update: What I don't want is the DetailView to have other details viewed as well. Meaning I don't want the records of other people on the DetailView as well. I just want the one record of that person, no one else's.

保存到数据库后,使用合适的会话管理技术重定向到发布主键数据的新页面,并使用detailsview加载详细信息

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM