Template Column

  • Thread starter Thread starter Mike P
  • Start date Start date
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?
 
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>
 
Back
Top