473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASPNet HyperLink NavigateUrl question

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
Aug 17 '07 #1
6 6459
"Jason Huang" <Ja************@hotmail.comwrote in message
news:er**************@TK2MSFTNGP04.phx.gbl...
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%>"
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 17 '07 #2
Seems not working yet ...
I'll try it later

"Mark Rae [MVP]" <ma**@markNOSPAMrae.net>
???????:%2***************@TK2MSFTNGP06.phx.gbl...
"Jason Huang" <Ja************@hotmail.comwrote in message
news:er**************@TK2MSFTNGP04.phx.gbl...
>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%>"
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 17 '07 #3
On 17 Aug, 09:08, "Jason Huang" <JasonHuang8...@hotmail.comwrote:
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
The method I prefer is to do this in you SQL Statement e.g.

select MyIPString + ' ' + MyFolderString as myField from myTable

Mark,
http://aspnetlibrary.com

Aug 17 '07 #4
"Jason Huang" <Ja************@hotmail.comwrote in message
news:OB**************@TK2MSFTNGP02.phx.gbl...

Top posting corrected...
>Assuming that MyIPString and MyFolderString are server-side variables...

NavigateUrl="<%=MyIPString+MyFolderString%>"
Seems not working yet ...
I'll try it later
What are MyIPString and MyFolderString? Where do they come from?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 17 '07 #5
Thanks.
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.
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.
And the value of FileName variable comes from a Label lblFileName.
Thanks for help.
Jason


"Mark Rae [MVP]" <ma**@markNOSPAMrae.net>
???????:eS**************@TK2MSFTNGP05.phx.gbl...
"Jason Huang" <Ja************@hotmail.comwrote in message
news:OB**************@TK2MSFTNGP02.phx.gbl...

Top posting corrected...
>>Assuming that MyIPString and MyFolderString are server-side variables...

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

What are MyIPString and MyFolderString? Where do they come from?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 20 '07 #6
"Jason Huang" <Ja************@hotmail.comwrote in message
news:uo**************@TK2MSFTNGP02.phx.gbl...
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%>"
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 20 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark Fox | last post by:
Hello, When I set a hyperlink server control's NavigateUrl to Webform.aspx?a=0&b=0 it outputs Webform.aspx?a=0&amp;b=0
0
by: Cynic07 | last post by:
As you can guess it in my subject, my question is for Microsoft System.Web.UI.WebControls team: Why HyperLink.NavigateUrl property is not marked as virtual? (I cannot override this property in...
2
by: MrMike | last post by:
I am attempting to pass a parameter named "BackURL" into a asp:Hyperlink HTML control as shown below. "BackURL" is actually a variable defined in the page's code-behind. However, my current...
0
by: Nathan Sokalski | last post by:
Whenever I assign a value to the HyperLink.NavigateUrl property, it adds an extra ../ in the generated href= attribute of the anchor tag. For example, when I assign it the value "comments.aspx" the...
1
by: tshad | last post by:
I need to explicitly use the path of my page and am trying to do the following: <asp:Hyperlink ID="test" Text="HyperLinkTest" NavigateUrl=<%#...
1
by: Jason Huang | last post by:
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...
1
by: Jason Huang | last post by:
Hi, My ASPNet HyperLink NavigateUrl is like http://192.168.0.1/OtherFolder/§ÚªºÀɮק¨/myfile, the OtherFolder is another folder rather than the ASPNet application's default folder in the IIS....
1
by: Jason Huang | last post by:
Hi, In my ASPNet 2.0 C#.Net, I have a string manipulation for a HyperLink as string strHLink= "<a href=\"" + HyperLink1.NavigateUrl.ToString() + "\">" + HyperLink1.Text.ToString() + "</a>" ...
6
by: Dmitry Duginov | last post by:
I have a FormView and a HyperLink on the page. If I use the following code behind (hooked up to Hyperlink's OnLoad event), it renders fine protected void link_Load(object sender, EventArgs e)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.