HyperLinkColumn

  • Thread starter Thread starter Sonny Sablan
  • Start date Start date
S

Sonny Sablan

I am trying to set two querystring variables in a HyperLinkColumn's
DataNavigateUrlFormatString...

I am aware of

HeaderText="Name" DataNavigateUrlField="i" DataTextField="n"
DataNavigateUrlFormatString="ListDetails.aspx?lid={0}

But I have a need to set two variables

ListDetails.aspx?lid={0}&sw= (this is what I need help with)

How can I do this?

Sonny
 
Have you tried something like this
members.aspx?sn=1&action=edit&id={0} the "{0}" gets the value gathered in
the id property.
Patrick
 
This is the answer! You cannot do it with DataNavigateUrlFormatString. You
have to define a template, and I include the dynamic sw in the Select
statement for the datagrid.

<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink runat="server" Text="View Details"
NavigateUrl='<%# "details.aspx?sw=" & _
Container.DataItem("sw") & _
"&ID=" & Container.DataItem("ID") %>' />
</ItemTemplate>
</asp:TemplateColumn>

Sonny
 
Back
Top