473,394 Members | 1,221 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,394 software developers and data experts.

How do you dynamically build <a href> in a reponse.write statement

Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.End
Here, I need to build the line (Response.Write <a href="default.asp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance
Jul 22 '05 #1
7 5436
Are you looking for

Response.Write "<a href=""default.asp"">Clik here</a>"

?

--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.End
Here, I need to build the line (Response.Write <a href="default.asp">Clik here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance

Jul 22 '05 #2
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.EndResponse.Write <a href="default.asp">Clik here
Here, I need to build the line (Response.Write <a href="default.asp">Clik here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance


Response.Write "<a href='default.asp'>Clik here
or
Response.Write "<a href=""default.asp"">Clik here
Jul 22 '05 #3
Thanks Ben, that was exactly I was looking for. I did not express myself
well, I guess. Regards

"Ben Strackany" wrote:
Are you looking for

Response.Write "<a href=""default.asp"">Clik here</a>"

?

--
Ben Strackany
www.developmentnow.com

<a href="http://www.developmentnow.com">dn</a>
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.End
Here, I need to build the line (Response.Write <a

href="default.asp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance


Jul 22 '05 #4
Hello Tom,
I was wondering what is the concept behind both the staetment being correct.
Thanks. Regards

"Tom Kaminski [MVP]" wrote:
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.EndResponse.Write <a href="default.asp">Clik here
Here, I need to build the line (Response.Write <a

href="default.asp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance


Response.Write "<a href='default.asp'>Clik here
or
Response.Write "<a href=""default.asp"">Clik here

Jul 22 '05 #5
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
Hello Tom,
I was wondering what is the concept behind both the staetment being

correct.

The concept is the browser will accept a quote or a double quote.
Jul 22 '05 #6
If you're in favor of following X-HTML standards and the standards that are
most likely to be adopted as time moves on, you should use " instead of '
for your tag attributes. In today's world, it really doesn't matter for
functionality's sake, but " is or will be the accepted strict standard, most
likely.

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:E1**********************************@microsof t.com...
Hello Tom,
I was wondering what is the concept behind both the staetment being
correct.
Thanks. Regards

"Tom Kaminski [MVP]" wrote:
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
> Hi,
> I have the following piece of code:If RS.EOF or RS.BOF Then
> Session("Authenticated") = False
>
> Response.Write "Sorry, your userid or password did not match"
> Response.Write "<BR>"
> Response.Write " or you have not registerd yet, please register"
> Response.Write <a href="default.asp">Clik here
> Response.EndResponse.Write <a href="default.asp">Clik here
> Here, I need to build the line (Response.Write <a

href="default.asp">Clik
> here)
> dynamically, so that the html output from asp page
> gives us <a href="default.asp">Clik here
> Thanks for any help or advise in advance


Response.Write "<a href='default.asp'>Clik here
or
Response.Write "<a href=""default.asp"">Clik here

Jul 22 '05 #7

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authenticated") = False

Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write " or you have not registerd yet, please register"
Response.Write <a href="default.asp">Clik here
Response.End
Here, I need to build the line (Response.Write <a
href="default.asp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.asp">Clik here
Thanks for any help or advise in advance


Double up on your double quotes: response.write "<a
href=""default,asp"">lick here</a>"

P
Jul 22 '05 #8

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

Similar topics

2
by: Gregor Horvath | last post by:
Hi, Before I reinvent the wheel I`d like to ask if someone has done this before since I did not find an advice at Google. The goal is to create a dynamic Tree View in HTML. Say I have a...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
2
by: Axel Dahmen | last post by:
HI, I want to dynamically add controls to a web page from within a common base class. Unfortunately, ASP.NET fails with "System.Web.HttpException: The Controls collection cannot be modified...
2
by: Magnus Blomberg | last post by:
Hello! I am trying to write a simple aspx page with You are logged on as <% getuser(); %> in the body text. In my code-behind I write (for test: public String getuser() { String s =...
3
by: ajaspersonal | last post by:
"i want to change font_style (hyper link<a href...>text</a>) normal to italics.when load a page" this is my problem but that label included in one 'USERCONTROL' This user controls may...
7
by: malineau | last post by:
I would like to be able to open a link utilising a variable as the destination. Something like <a href=variablename><\a> where variablename specifies a page address within the website. But I can't...
1
by: John | last post by:
Hi var poster="<html><head..... etc .... </html>"; var animal='dog'; The string contains images and text that changes. Originally I wanted to do something like print "<a href=" +...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.