Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp:hyperlink navigateurl problem - link not showing up

Status
Not open for further replies.

sbushway

Programmer
Jan 27, 2003
58
US
Hi,
I have a link on one of my pages that goes back to the previous page. The link is not in a DataGrid - just in an HTML table.

My code is this:
Code:
<asp:hyperlink id=hyperlink1 runat=server NavigateUrl='<%# strURL & lblOrderID.Text & &quot;)&quot; %>'>Back</asp:hyperlink>

strURL is defined in my codebehind page as &quot;javascript:goBack(&quot;

When I run the page, the only thing that shows up is the word Back. No link or anything.

I really need to set up my URL like this as I have to pass the OrderID via a form variable (my goBack function submits the form)

In other pages I've written, I set up links just like this and it's worked fine. The only difference is that those links were in a datagrid, and this link is not.


Any suggestions would be appreciated.

Thanks in advance!
Suzanne
 
In the other pages, you've probably done

DataGrid.DataBind

In this one, you need to do Me.DataBind, because the data binding's container is the page, and not a datagrid.

HTH

Mark [openup]
 
Hi Mark,
Where do I put Me.Databind?

Thanks for your help,
Suzanne
 
I got it to work using a different method. I set the NavigateURL property in my codebehind page.

Thanks for your time!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top