How to show lookup text in asp.net

  • Thread starter Thammarat charoenchai.
  • Start date
T

Thammarat charoenchai.

Hi.

I'm newbie to asp.net

now i can use gridview to show data from sqldatasource.
But I wonder How to show lookup field data.

like

get parameter from querystring name "pid" (ProductID) and show ProductName
in webpage to user?

anyone help me & thanksyou

sorry about my english :D
 
R

Riki

Thammarat said:
Hi.

I'm newbie to asp.net

now i can use gridview to show data from sqldatasource.
But I wonder How to show lookup field data.

like

get parameter from querystring name "pid" (ProductID) and show
ProductName in webpage to user?

Use SQL.
Make a JOIN query with both tables.

If you don't know how to do this, I guess you're using Access?
Go into query design, add both tables, link them, select the fields you want
to show in the gridview, and then choose View - Sql View.
Access will have built the SQL query you need.

You can do the same thing from Visual Studio or Visual Web Developer with
the Query Builder.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top