Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink control 1

Status
Not open for further replies.

Jouster

Programmer
Dec 4, 2000
82
US
Hi,

New to the asp.net and I'm trying to figure out how to dynamically add text to the navigateUrl property.

I am databinding to a grid and i want a column for hyperlinks.

Here is the code I have:

<asp:TemplateField HeaderText="">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:HyperLink ID="lnkAddToCart" runat="server" ImageUrl="~/assets/common/icons/addtocart.gif"
NavigateUrl="~/commerce/cart.aspx?AddPartNo=">Add To Cart.</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

I want to dynamically fill in the part number after the "cart.aspx?AddPartNumber=" how is this handled in asp.net?

thanks,

Rick
 
Do you have visual studio or a way to debug(step-through) you code?

The code I provied is valid, not sure what the problem is. Hard to say when you don't have an IDE to help.
 
Unfortunately the site and the database are on remote servers and I can't use an IDE at this point.

I have found that the code i have above, that I got from MSDN, works if I set AutoGenerateColumns = True. I will find a work around with this option.

Thanks for all the help.

 
Unfortunately the site and the database are on remote servers and I can't use an IDE at this point.
That should not matter, you can still use an IDE.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top