How to pass 2 fields to DataNavigateUrlFormatString using DataBinder.Eval

Posted on 2006-05-04
Last Modified: 2008-01-09
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}"

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.

Question by:poojanair
    1 Comment
    LVL 96

    Accepted Solution

    This property doesn't support 2 fields as far as I know.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now