0

i am displaying products in list view ! now in <itemTemplate> i'm showing the product name by doing :

<b> <%# Eval("ProductName") %></b>

now i would like to also show the price of this product. but the price is in another table since prices are different for different types of users ! so i have to get the product id and user type first in order to get the price type from the price table. so i did a label:

<label id="lblPrice" runat="server">
                             </label>

which i will be using it in the code to set its text to the price. can anyone pls let me know how i can access and edit this label from the code ?! thanks

3
Contributors
5
Replies
6
Views
4 Years
Discussion Span
Last Post by missc
0

no it's not being shown ! i think its all because the label is in <itemTemplate>

0

You need to define SQL statemet that fetch rows from both these tables. Please post the tables description if possible.

0

tblPrice

float price,
int productId,(fk)
int userTypeId,(fk)
int priceID(pk)

tblproduct

int productID,(pk)
int productName,

tblUserType

int userTypeID, (pk)
string username (fk)

tblUser

string username(pk)
....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.