Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   TemplateColumn, HyperLink and &Amp (http://www.velocityreviews.com/forums/t761215-templatecolumn-hyperlink-and-and-amp.html)

Versteijn 10-20-2004 03:45 PM

TemplateColumn, HyperLink and &Amp
 
Hello all,

I have a TemplateColumn, and a GetLink method, like below. In my
links, however, the & for the parameters gets converted to &. That
is definitely not what I want. What can I do about this?

My actual link contains more fields from the database, so using
HyperlinkColumn is not an option I guess.

Thank you.

Regards,

David van Leerdam



<asp:TemplateColumn SortExpression="Price" HeaderText="Price">
<ItemTemplate>
<asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.Price", "{0:C}") %>' NavigateUrl='<%#
getLink(CInt(DataBinder.Eval(Container, "DataItem.ProductID"))) %>'
Target="_self"></asp:HyperLink>
</ItemTemplate>

GetLink looks like this:

Public Function getLink(ByVal productid As Integer) As String
Dim Url As String

If Request("mode") = 2 Then
Url = String.Format("productdetail.aspx?product={0}",
productid)
Else
Url = String.Format("productdetail.aspx?test={0}",
productid)
End If

Return Url
End Function


All times are GMT. The time now is 05:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.