Velocity Reviews

Velocity Reviews (
-   ASP .Net Datagrid Control (
-   -   TemplateColumn, HyperLink and &Amp (

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.


David van Leerdam

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

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}",
Url = String.Format("productdetail.aspx?test={0}",
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.