I have this user control:
<user:RatingStars runat="server" product="<%= getProductId() %>" category="<%= getCategoryId() %>"></user:RatingStars>
You can see that I fill in the product and category by calling two methods:
public string getProductId()
{
return productId.ToString();
}
public string getCategoryId()
{
return categoryId.ToString();
}
I do not understand why, in the user control, when I take the data received (product and category) it gives me "<%= getProductId() %>" instead of giving the id received from that method...
Any help would be kindly appreciated...
Edit: Solved with: product='<%# getProductId() %>'
Last problem: in the user control I have this:
public string productId;
public string product
{
get
{
return productId;
}
set
{
productId = value;
}
}
So, I expect that the productId is set up ok in the user control. Unfortunately it is null when I try to use it...
Is there anything I wrote that's incorrect?