473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("Authen ticated") = 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.a sp">Clik here
Response.End
Here, I need to build the line (Response.Write <a href="default.a sp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.a sp">Clik here
Thanks for any help or advise in advance
Jul 22 '05 #1
7 5456
Are you looking for

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

?

--
Ben Strackany
www.developmentnow.com

<a href="http://www.development now.com">dn</a>
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authen ticated") = 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.a sp">Clik here
Response.End
Here, I need to build the line (Response.Write <a href="default.a sp">Clik here)
dynamically, so that the html output from asp page
gives us <a href="default.a sp">Clik here
Thanks for any help or advise in advance

Jul 22 '05 #2
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authen ticated") = 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.a sp">Clik here
Response.EndRes ponse.Write <a href="default.a sp">Clik here
Here, I need to build the line (Response.Write <a href="default.a sp">Clik here)
dynamically, so that the html output from asp page
gives us <a href="default.a sp">Clik here
Thanks for any help or advise in advance


Response.Write "<a href='default.a sp'>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.development now.com">dn</a>
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authen ticated") = 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.a sp">Clik here
Response.End
Here, I need to build the line (Response.Write <a

href="default.a sp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.a sp">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**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authen ticated") = 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.a sp">Clik here
Response.EndRes ponse.Write <a href="default.a sp">Clik here
Here, I need to build the line (Response.Write <a

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


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

Jul 22 '05 #5
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:E1******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message
news:E1******** *************** ***********@mic rosoft.com...
Hello Tom,
I was wondering what is the concept behind both the staetment being
correct.
Thanks. Regards

"Tom Kaminski [MVP]" wrote:
"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
> Hi,
> I have the following piece of code:If RS.EOF or RS.BOF Then
> Session("Authen ticated") = 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.a sp">Clik here
> Response.EndRes ponse.Write <a href="default.a sp">Clik here
> Here, I need to build the line (Response.Write <a

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


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

Jul 22 '05 #7

"Jack" <Ja**@discussio ns.microsoft.co m> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi,
I have the following piece of code:If RS.EOF or RS.BOF Then
Session("Authen ticated") = 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.a sp">Clik here
Response.End
Here, I need to build the line (Response.Write <a
href="default.a sp">Clik
here)
dynamically, so that the html output from asp page
gives us <a href="default.a sp">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
3889
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 data strucure like this: structList =
2
10569
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 type="text/javascript"> <!]> </script> <script type="text/javascript"
6
3876
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 place the tags one after another without any spaces between them. For example, a space gets rendered between these two href's when displayed in firefox or IE. <a href="#"><img border="0" height="10" src="test.gif" width="10" /></a>
2
7367
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 because the control contains code blocks (i.e. <% ... %>)." All of my pages contain these kind of blocks, for several reasons. For one, I don't know any other way to dynamically add header information like e.g. style sheet links to a web page. So, is...
2
1365
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 = Environment.UserDomainName + "\\" + Environment.UserName; return "testing"; // s; }
3
2942
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 condain 4 link (<a href...>page1.aspx</a <br <a href ....>page2</aetc..). that will redirect another page ex:(page1.aspx).
7
20769
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 work out how to parse the variable into the href statement. Basically I'm trying to produce a sort of breadcrumb trail, such that at the top of each page a user has a sequential list of the pages he has visited up until now - these are passed url...
1
2253
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=" + poster + ">Choose Poster of a " + animal + "</a>";
3
3384
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, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10452
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10221
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10169
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.