Correct format of a HyperlinkField using ASP.Net 2.0

Posted on 2007-10-16
Last Modified: 2013-11-07
Could anyone give me the correct format of this HyperlinkField?

<asp:HyperLinkField  DataTextField="cntAssigned1"  HeaderText="cntAssigned1" NavigateUrl="CampusCourse.aspx?cNum=" + ("CourseNumber") + "&aId=" + ("AcademicLevelText") + "&s=1" + "&post=1" SortExpression="cntAssigned1" />
Question by:keithwilson1
    LVL 16

    Expert Comment

    Here is the basics....check out
    thats where I found this example...


    <form runat="server">
    Text="Visit W3Schools!"
    runat="server" />

    LVL 16

    Accepted Solution

    Are CourseNumber and AcademicLevelText fields?

    Something like this should do the trick: -

    <asp:HyperLinkField  DataTextField="cntAssigned1"  HeaderText="cntAssigned1" datanavigateurlformatstring="CampusCourse.aspx?cNum={0}&aId={1}&s=1", datanavigateurlfields="CourseNumber, AcademicLevelText" SortExpression="cntAssigned1" />
    LVL 14

    Assisted Solution

    by:Dustin Hopkins
    <asp:HyperLinkField HeaderText="cntAssigned1" DataTextField="course_id" DataNavigateUrlFields="CourseNumber,AcademicLevelText" DataNavigateUrlFormatString="CampusCourse.aspx?cNum={0}&aId={1}&s=1&post=1" SortExpression="cntAssigned1" />

    Author Comment

    Thank you so much.  You are true artists of this technology.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    734 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

    23 Experts available now in Live!

    Get 1:1 Help Now