Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • Last Modified:

Correct format of a HyperlinkField using ASP.Net 2.0

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" />
0
keithwilson1
Asked:
keithwilson1
2 Solutions
 
SQL_SERVER_DBACommented:
Here is the basics....check out http://www.w3schools.com/aspnet/control_hyperlink.asp
thats where I found this example...


<html>
<body>

<form runat="server">
<asp:HyperLink
ImageUrl="/banners/w6.gif"
NavigateUrl="http://www.w3schools.com"
Text="Visit W3Schools!"
Target="_blank"
runat="server" />
</form>

</body>
</html>
0
 
McExpCommented:
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" />
0
 
Dustin HopkinsManaging MemberCommented:
<asp:HyperLinkField HeaderText="cntAssigned1" DataTextField="course_id" DataNavigateUrlFields="CourseNumber,AcademicLevelText" DataNavigateUrlFormatString="CampusCourse.aspx?cNum={0}&aId={1}&s=1&post=1" SortExpression="cntAssigned1" />
0
 
keithwilson1Author Commented:
Thank you so much.  You are true artists of this technology.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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