469,342 Members | 5,602 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

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 5300
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Gregor Horvath | last post: by
2 posts views Thread by Donald Firesmith | last post: by
6 posts views Thread by snacktime | last post: by
2 posts views Thread by Magnus Blomberg | last post: by
3 posts views Thread by ajay2552 | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.