• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

How to pass 2 fields to DataNavigateUrlFormatString using DataBinder.Eval

Hi,
I'm trying to pass 2 fields to DataNavigateUrlFormatString but  it does not work.
The simple way is

            <asp:HyperLinkField Text="Edit" DataNavigateUrlFormatString="../News/News.aspx?ID={0}&Name={1}"
DataNavigateUrlFields="intNewsID,strNewsTitle">

But I need to do type casting and have to do something like
<asp:HyperLinkField Text="Edit
DataNavigateUrlFormatString=="../News/News.aspx?ID=<%#DataBinder.Eval(Container.DataItem,"ID")%>&Name=<%#DataBinder.Eval(Container.DataItem,"FullName")%>" />
even tried
<asp:HyperLinkField Text="Edit
DataNavigateUrlFormatString=="../News/News.aspx?ID='<%#DataBinder.Eval(Container.DataItem,"ID")%>'&Name='<%#DataBinder.Eval(Container.DataItem,"FullName")%>' " />
Can somebody tell me whats wrong with this code.
Thanks in Advance.





0
poojanair
Asked:
poojanair
1 Solution
 
Bob LearnedCommented:
This property doesn't support 2 fields as far as I know.

Bob
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now