473,395 Members | 2,437 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,395 software developers and data experts.

Using variable name in Href

Hi Guys

How can i use the variable name instead of a hardcoded value when writing a
hyperlink.

strBody = strBody & "<a href="default.htnk">Login</a>"
I would like to use a variable name instead of directly writing default.html
like below

strPageName = "default.html"

strBody = strBody & "<a href="<%=strPageName%>">Login</a>"
Anyone know how this can be done

thanks

Jas
Jul 19 '05 #1
2 3746
strBody = strBody & "<a href="""&strPageName&""">Login</a>"

"J P Singh" <noemail@asIhatespam> wrote in message
news:Om****************@TK2MSFTNGP09.phx.gbl...
Hi Guys

How can i use the variable name instead of a hardcoded value when writing a hyperlink.

strBody = strBody & "<a href="default.htnk">Login</a>"
I would like to use a variable name instead of directly writing default.html like below

strPageName = "default.html"

strBody = strBody & "<a href="<%=strPageName%>">Login</a>"
Anyone know how this can be done

thanks

Jas

Jul 19 '05 #2
assuming client-side script w/ server side var, then :
strBody = strBody & "<a href='<%= strPageName %>'>Login</a>"

"J P Singh" <noemail@asIhatespam> wrote in message
news:Om****************@TK2MSFTNGP09.phx.gbl...
Hi Guys

How can i use the variable name instead of a hardcoded value when writing a hyperlink.

strBody = strBody & "<a href="default.htnk">Login</a>"
I would like to use a variable name instead of directly writing default.html like below

strPageName = "default.html"

strBody = strBody & "<a href="<%=strPageName%>">Login</a>"
Anyone know how this can be done

thanks

Jas

Jul 19 '05 #3

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

Similar topics

6
by: Hansan | last post by:
Hi all. I am working on a webpage where I use python and html. When I want to send one variable to a new script/page I use the following code: 0) print '''<input type=hidden name="eventid"...
6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
3
by: Paul Eghbal | last post by:
Hi all, I'm trying to use the following script: <script language="javaScript"> function setrepto(){ document.aForm.repno.value = document.aForm.rep.options.value; } </script>
0
by: David | last post by:
Please help. I am able to display a folder structure and files but I can't figure out how to add subfolders and maintain the same look. I am a little embarrased but I thought someone out there...
1
by: stephane | last post by:
I have a problem which must be in this : print" <script type='text/javascript'> document.location.replace('http://127.0.0.1/add_task.php?req_id={$maxValue}&tk_request_name={$req_name}');...
8
by: Jeff Higgins | last post by:
Hi, In the variable "anchor" I would like to, (I think), use the value of the variable "text" in the predicate of the select expression. Is this possible? Is there a better way of doing...
1
by: bsprogs | last post by:
I am currnetly programming a file hosting website in PHP and I am slowly integrating AJAX into the website. Here is my problem: The user uploads the file. The server processes the file and...
1
by: shalini jain | last post by:
Hi, I want to know how can we do pagination using XSL. There are number of tutorials available on pagination using PHP but nothing with XSL. i am really stuck with my code. Below is the code that...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
1
by: swethak | last post by:
hi, i have a code to disply the calendar and add events to that. It works fine.But my requirement is to i have to disply a weekly and daily calendar.Any body plz suggest that what modifications i...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.