DavidTanis
asked on
HyperlinkColumn in Datagrid
How do I pass more than one column in query string when used in a datagrid hyperlinkcolumn ?
xxx.aspx?column1={0}&colum n2= ?
xxx.aspx?column1={0}&colum
And I on the other hand use a TemplateColumn with a Hyperlink control. =)
<asp:templatecolumn>
<itemtemplate>
<asp:hyperlink NavigateUrl='xxx.aspx?colu mn1=<%# DataBinder.Eval(Container. DataItem, "column1") %>&column2=<%# DataBinder.Eval(Container. DataItem, "column2") %>' Text='<%# DataBinder.Eval(Container. DataItem, "columntodisplay") %>'></asp:hyperlink>
</itemtemplate>
</asp:templatecolumn>
Paul
<asp:templatecolumn>
<itemtemplate>
<asp:hyperlink NavigateUrl='xxx.aspx?colu
</itemtemplate>
</asp:templatecolumn>
Paul
hi,
try this:
<asp:HyperLink ID="VariableName" Runat="server" Text='<%#DataBinder.Eval(C ontainer.D ataItem,"Y ourFieldTo Display") %>' NavigateUrl='<%# String.Format("YourPage.as px?FieldNa me1toPass= {0}&FieldN ame2toPass ={1}&Field Name3toPas s={2}&Fiel dName4toPa ss={3}",Da taBinder.E val(Contai ner.DataIt em, "FieldNo1"),DataBinder.Eva l(Containe r.DataItem , "FieldNo2"),DataBinder.Eva l(Containe r.DataItem , "FieldNo4"),DataBinder.Eva l(Containe r.DataItem , "FieldNo5"))%>'</asp:Hyper Link>
Hope this helps.
ayha
try this:
<asp:HyperLink ID="VariableName" Runat="server" Text='<%#DataBinder.Eval(C
Hope this helps.
ayha
ASKER
<asp:TemplateColumn SortExpression="Count" HeaderText="Count">
<ItemTemplate>
<asp:HyperLink id=HyperLink1 runat="server" Text='<%# DataBinder.Eval(Container. DataItem, "cnt") %>' NavigateUrl='xxx.aspx?a=<% # DataBinder.Eval(Container. DataItem, "a") %>&b=<%# DataBinder.Eval(Container. DataItem, "b") %>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
When I looked into the querystring, the value for "a" was retrived as "<%" , not the value in column a. and "b" shows nothing.
Is it missing anything in the code? Thanks
<ItemTemplate>
<asp:HyperLink id=HyperLink1 runat="server" Text='<%# DataBinder.Eval(Container.
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
When I looked into the querystring, the value for "a" was retrived as "<%" , not the value in column a. and "b" shows nothing.
Is it missing anything in the code? Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<asp:templatecolumn>
<itemtemplate>
<a href='Summary.aspx?column1
</itemtemplate>
</asp:templatecolumn>