Template Column

M

Mike P

I have a Hyperlink Column which I need to convert to a Template Column
so that I can pass multiple parameters.

My current code is like this and works for a single parameter:

<asp:HyperLinkColumn
DataTextField="Name"
DataNavigateURLField="Name"

DataNavigateUrlFormatString="javascript:var
NewWin=window.open(user_details.aspx?Name={0}',null,'width=800,height=20
0,top=100,left=100,scrollbars=no,directories=no,status=no,toolbar=no,res
izable=no');"
HeaderText="Name" />


How can I convert my HyperLink column code above into Template Column
format?
 
S

Saravana

Like this you can convert ,
<asp:DataGrid id="DataGrid1" AutoGenerateColumns="False" style="Z-INDEX:
101; LEFT: 66px; POSITION: absolute; TOP: 79px" runat="server">

<Columns>

<asp:TemplateColumn HeaderText="Order">

<ItemTemplate>

<asp:Hyperlink runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,"OrderID")%>' NavigateUrl='<%#
"page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") +
"&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>'
ID="Hyperlink1" NAME="Hyperlink1"/>

</ItemTemplate>

</asp:TemplateColumn>

</Columns>

</asp:DataGrid>
 

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

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top