• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

VB.NET view data based on id


I would think that this is fundamental knowledge, but apparently it has escaped me. :)

I have an aspx page where I want to display data based on SQL data id.

I have a datasource and a gridview (I'm thinking this could be done with a repeater and an ItemTemplate also?)

How do I get a specific record displayed like when you see http://www.somesite.com/ViewPage.aspx?recordID=123
2 Solutions
Shaun KlineLead Software EngineerCommented:
If you are using a datasource control bound to the gridview, and your SQL uses a parameter for recordid, you can bind that parameter to the query string using the UI for the datasource control.
send your query string value to ur sql query and check this id in where condition

ex: select * from tblX Where id = @recordid

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now