HyperLinkColumn

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
 
P

Patrick.O.Ige

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
 
S

Sonny Sablan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top