ASPNet HyperLink NavigateUrl question

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In my ASPNet 2.0 C# web form, there's a
<asp:HyperLink ID="HyperLinkA" ...
NavigateUrl="http://MyIP/MyFolder/MySubFolder"> TestLink </asp:HyperLink>
My question is how to config the NavigateUrl as the combination of 2 strings
"MyIPString"+"MyFolderString"?
Thanks for help.


Jason
 
In my ASPNet 2.0 C# web form, there's a
<asp:HyperLink ID="HyperLinkA" ...
NavigateUrl="http://MyIP/MyFolder/MySubFolder"> TestLink </asp:HyperLink>
My question is how to config the NavigateUrl as the combination of 2
strings
"MyIPString"+"MyFolderString"?
Thanks for help.

Assuming that MyIPString and MyFolderString are server-side variables...

NavigateUrl="<%=MyIPString+MyFolderString%>"
 
Seems not working yet ...
I'll try it later

Mark Rae said:
Assuming that MyIPString and MyFolderString are server-side variables...

NavigateUrl="<%=MyIPString+MyFolderString%>"
 
What I want is something like http://192.168.0.1/Root/Tree/FileName,
where the MyIPString represent the http://192.168.0.1/Root/Tree/,
and the MyFolderString represent the FileName.
OK.

Actually I don't think the MyIPString is an server-side variable, I want
to declare it in the ASPX file, but I don't know how.

protected MyIPString = "http://192.168.0.1/Root/Tree/";
And the value of FileName variable comes from a Label lblFileName.
Thanks for help.

NavigateUrl="<%=MyIPString+lblFileName.Text%>"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top