472,350 Members | 1,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

hyperlink in asp

Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") & vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks
May 23 '06 #1
15 1973

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") & vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


http://www.w3schools.com/

Run through HTML and ASP sections.
May 23 '06 #2
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


http://www.w3schools.com/

Run through HTML and ASP sections.

I don't mind searching, but I can't find the key words to find what I am
looking for.
Any ideas?
May 23 '06 #3

Jeff wrote:
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


http://www.w3schools.com/

Run through HTML and ASP sections.

I don't mind searching, but I can't find the key words to find what I am
looking for.
Any ideas?


This is pretty basic stuff. How would you make a hyperlink in html?
Then how would you response.write that?

--
Mike Brind

May 23 '06 #4
I understand that, but I don't understand how to make it read a text block,
from a DB, and make it show clickable links, when needed.

Back to the drawing board i guess..lol

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...

Jeff wrote:
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...
>
> "Jeff" <gi*****@adelphia.net> wrote in message
> news:9u******************************@adelphia.com ...
>> Hey gang.
>>
>> i have this
>>
>> Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
>> vbCrLf
>>
>> coming from access db.
>>
>> how can i get that to make a hyperlink clickable as well??
>>
>> Thanks
>>
>>
>
> http://www.w3schools.com/
>
> Run through HTML and ASP sections.
>
>

I don't mind searching, but I can't find the key words to find what I am
looking for.
Any ideas?


This is pretty basic stuff. How would you make a hyperlink in html?
Then how would you response.write that?

--
Mike Brind

May 23 '06 #5

http://www.powerasp.com/content/new/...hyperlinks.asp
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


http://www.w3schools.com/

Run through HTML and ASP sections.

May 24 '06 #6
lol

Bob Lehmann

"Jeff" <gi*****@adelphia.net> wrote in message
news:Tp******************************@adelphia.com ...
I understand that, but I don't understand how to make it read a text block, from a DB, and make it show clickable links, when needed.

Back to the drawing board i guess..lol

"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...

Jeff wrote:
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...
>
> "Jeff" <gi*****@adelphia.net> wrote in message
> news:9u******************************@adelphia.com ...
>> Hey gang.
>>
>> i have this
>>
>> Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
>> vbCrLf
>>
>> coming from access db.
>>
>> how can i get that to make a hyperlink clickable as well??
>>
>> Thanks
>>
>>
>
> http://www.w3schools.com/
>
> Run through HTML and ASP sections.
>
>
I don't mind searching, but I can't find the key words to find what I am looking for.
Any ideas?


This is pretty basic stuff. How would you make a hyperlink in html?
Then how would you response.write that?

--
Mike Brind


May 24 '06 #7
now that i DO understand..lol

thanks a bunch
"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP04.phx.gbl...

http://www.powerasp.com/content/new/...hyperlinks.asp
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


http://www.w3schools.com/

Run through HTML and ASP sections.


May 24 '06 #8
>From the page in the link:

"People seem to act like this is some sort of mystical and complex
process and they couldn't be farther from the truth. Like I keep
telling everyone ASP is just dynamically created HTML and making a
hyperlink is accomplished by mixing HTML tags with the ASP variables.
It's very simple to make a hyperlink."

Hmmm.... so your discombobulation over hyperlinks appears to be shared
by others. I shall endeavour to be a little more understanding in
future :-)

--
Mike Brind

Jeff wrote:
now that i DO understand..lol

thanks a bunch
"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP04.phx.gbl...

http://www.powerasp.com/content/new/...hyperlinks.asp
"Anthony Jones" <An*@yadayadayada.com> wrote in message
news:OP****************@TK2MSFTNGP04.phx.gbl...

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks

http://www.w3schools.com/

Run through HTML and ASP sections.



May 24 '06 #9
I give up. Seems like this one is too easy, yet it keeps eluding me.

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") & vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks

May 26 '06 #10
Jeff wrote on 26 mei 2006 in microsoft.public.inetserver.asp.general:
"Jeff" <gi*****@adelphia.net> wrote in message

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

[please do not toppost on usenet]
I give up. Seems like this one is too easy, yet it keeps eluding me.


You cannot get that to make a hyperlink clickable,
as a hyperlink is clickable by itself.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 26 '06 #11
Jeff wrote:
I give up. Seems like this one is too easy, yet it keeps eluding me.

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


Why don't you tell us
1. What is in Rs("Event_Details") ?
2. What you want to see in the source sent to the browser? (what one would
see when selecting View Source)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 26 '06 #12
Ok. I went about this a different way. I had an old script that changed
spaces, <br>'s and stuff... so i went with that, then used a little html,
and the result is this, and it works.
<br>
<font face="Verdana,Arial" size="1"><% myString =
Replace(Rs("Event_Details"), vbCrLf, " <br> ")%><%=
InsertHyperlinks(myString)%><br>
&nbsp;</font></p>
thanks again.
Bob, thanks for replying, and what it was showing in the source, was the
link without it being clickable. but with this code it is.

Thanks again.
"Jeff" <gi*****@adelphia.net> wrote in message
news:bs******************************@adelphia.com ...
I give up. Seems like this one is too easy, yet it keeps eluding me.

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks


May 27 '06 #13
Or, you could have used the obvious:

<a href="[url]"><%=mystring%></a>

There is no such thing as a link that isn't clickable, as Evertjan has
already pointed out. There is a string written to a page, or there is
a string encapsulated in an <a href> tag which forms a hyperlink. As I
said - basic html.

--
Mike Brind
Jeff wrote:
Ok. I went about this a different way. I had an old script that changed
spaces, <br>'s and stuff... so i went with that, then used a little html,
and the result is this, and it works.
<br>
<font face="Verdana,Arial" size="1"><% myString =
Replace(Rs("Event_Details"), vbCrLf, " <br> ")%><%=
InsertHyperlinks(myString)%><br>
&nbsp;</font></p>
thanks again.
Bob, thanks for replying, and what it was showing in the source, was the
link without it being clickable. but with this code it is.

Thanks again.
"Jeff" <gi*****@adelphia.net> wrote in message
news:bs******************************@adelphia.com ...
I give up. Seems like this one is too easy, yet it keeps eluding me.

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
Hey gang.

i have this

Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
vbCrLf

coming from access db.

how can i get that to make a hyperlink clickable as well??

Thanks



May 27 '06 #14
Oh, wait a minute... let me guess...

Event Details is a memo field that contains some text describing an
event, and also includes email and/or web addresses, and it is these
that you want to identify and turn into hyperlinks. Is that right?
You don't want to turn the whole field into a hyperlink, do you?

If this is the case, and you had explained your problem properly at the
beginning, I would have posted this code several days ago:

<%
function create_links(strText)
strText = " " & strText
strText = ereg_replace(strText, "(^|[\n ])([\w]+?://[^ ,""\s<]*)",
"$1<a href=""$2"" target=""_blank"">$2</a>")
strText = ereg_replace(strText, "(^|[\n ])((www|ftp)\.[^ ,""\s<]*)",
"$1<a href=""http://$2"" target=""_blank"">$2</a>")
strText = ereg_replace(strText, "(^|[\n
])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)", "$1<a
href=""mailto:$2@$3"">$2@$3</a>")
strText = right(strText, len(strText)-1)
create_links = strText
end function

function ereg_replace(strOriginalString, strPattern, strReplacement)
' Function replaces pattern with replacement
dim objRegExp : set objRegExp = new RegExp
objRegExp.Pattern = strPattern
objRegExp.IgnoreCase = True
objRegExp.Global = True
ereg_replace = objRegExp.replace(strOriginalString, strReplacement)
set objRegExp = nothing
end function
%>

which you call like this:
<%
Response.Write create_links(myString)
%>

In fact, I tend to use it on data prior to inserting it into a
database, which means the function isn't called every time a user
requests a page which contains text that might or might not have email
or web addresses in it that need to be turned into links. Does your
InsertLinks() function do the same thing?

--
Mike Brind
Mike Brind wrote:
Or, you could have used the obvious:

<a href="[url]"><%=mystring%></a>

There is no such thing as a link that isn't clickable, as Evertjan has
already pointed out. There is a string written to a page, or there is
a string encapsulated in an <a href> tag which forms a hyperlink. As I
said - basic html.

--
Mike Brind
Jeff wrote:
Ok. I went about this a different way. I had an old script that changed
spaces, <br>'s and stuff... so i went with that, then used a little html,
and the result is this, and it works.
<br>
<font face="Verdana,Arial" size="1"><% myString =
Replace(Rs("Event_Details"), vbCrLf, " <br> ")%><%=
InsertHyperlinks(myString)%><br>
&nbsp;</font></p>
thanks again.
Bob, thanks for replying, and what it was showing in the source, was the
link without it being clickable. but with this code it is.

Thanks again.
"Jeff" <gi*****@adelphia.net> wrote in message
news:bs******************************@adelphia.com ...
I give up. Seems like this one is too easy, yet it keeps eluding me.

"Jeff" <gi*****@adelphia.net> wrote in message
news:9u******************************@adelphia.com ...
> Hey gang.
>
> i have this
>
> Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
> vbCrLf
>
> coming from access db.
>
> how can i get that to make a hyperlink clickable as well??
>
> Thanks
>


May 27 '06 #15
right... this is what i have at the top of the page
<%

Function InsertHyperlinks(inText)
Dim objRegExp, strBuf
Dim objMatches, objMatch
Dim Value, ReplaceValue, iStart, iEnd

strBuf = ""
iStart = 1
iEnd = 1
Set objRegExp = New RegExp

objRegExp.Pattern = "\b(www|http|\S+@)\S+\b" ' Match URLs and emails
objRegExp.IgnoreCase = True ' Set case insensitivity.
objRegExp.Global = True ' Set global applicability.
Set objMatches = objRegExp.Execute(inText)
For Each objMatch in objMatches
iEnd = objMatch.FirstIndex
strBuf = strBuf & Mid(inText, iStart, iEnd-iStart+1)
If InStr(1, objMatch.Value, "@") Then
strBuf = strBuf & GetHref(objMatch.Value, "EMAIL", "_BLANK")
Else
strBuf = strBuf & GetHref(objMatch.Value, "WEB", "_BLANK")
End If
iStart = iEnd+objMatch.Length+1
Next
strBuf = strBuf & Mid(inText, iStart)
InsertHyperlinks = strBuf
End Function
Function GetHref(url, urlType, Target)
Dim strBuf

strBuf = "<a href="""
If UCase(urlType) = "WEB" Then
If LCase(Left(url, 3)) = "www" Then
strBuf = "<a href=""http://" & url & """ Target=""" & _
Target & """>" & url & "</a>"
Else
strBuf = "<a href=""" & url & """ Target=""" & _
Target & """>" & url & "</a>"
End If
ElseIf UCase(urlType) = "EMAIL" Then
strBuf = "<a href=""mailto:" & url & """ Target=""" & _
Target & """>" & url & "</a>"
End If

GetHref = strBuf

End Function
%>

and the
<% myString = Replace((event_details), vbCrLf, " <br> ")%><%=
InsertHyperlinks(myString)%>

is the output for the field

if all that was in there was the url, i could have done that with no
problem. the problem was converting what i posted originally into a
response.write so i avoided that, and made it into html with some script.
thanks for all the help :)
"Mike Brind" <pa*******@hotmail.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
Oh, wait a minute... let me guess...

Event Details is a memo field that contains some text describing an
event, and also includes email and/or web addresses, and it is these
that you want to identify and turn into hyperlinks. Is that right?
You don't want to turn the whole field into a hyperlink, do you?

If this is the case, and you had explained your problem properly at the
beginning, I would have posted this code several days ago:

<%
function create_links(strText)
strText = " " & strText
strText = ereg_replace(strText, "(^|[\n ])([\w]+?://[^ ,""\s<]*)",
"$1<a href=""$2"" target=""_blank"">$2</a>")
strText = ereg_replace(strText, "(^|[\n ])((www|ftp)\.[^ ,""\s<]*)",
"$1<a href=""http://$2"" target=""_blank"">$2</a>")
strText = ereg_replace(strText, "(^|[\n
])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)", "$1<a
href=""mailto:$2@$3"">$2@$3</a>")
strText = right(strText, len(strText)-1)
create_links = strText
end function

function ereg_replace(strOriginalString, strPattern, strReplacement)
' Function replaces pattern with replacement
dim objRegExp : set objRegExp = new RegExp
objRegExp.Pattern = strPattern
objRegExp.IgnoreCase = True
objRegExp.Global = True
ereg_replace = objRegExp.replace(strOriginalString, strReplacement)
set objRegExp = nothing
end function
%>

which you call like this:
<%
Response.Write create_links(myString)
%>

In fact, I tend to use it on data prior to inserting it into a
database, which means the function isn't called every time a user
requests a page which contains text that might or might not have email
or web addresses in it that need to be turned into links. Does your
InsertLinks() function do the same thing?

--
Mike Brind
Mike Brind wrote:
Or, you could have used the obvious:

<a href="[url]"><%=mystring%></a>

There is no such thing as a link that isn't clickable, as Evertjan has
already pointed out. There is a string written to a page, or there is
a string encapsulated in an <a href> tag which forms a hyperlink. As I
said - basic html.

--
Mike Brind
Jeff wrote:
> Ok. I went about this a different way. I had an old script that changed
> spaces, <br>'s and stuff... so i went with that, then used a little
> html,
> and the result is this, and it works.
> <br>
> <font face="Verdana,Arial" size="1"><% myString =
> Replace(Rs("Event_Details"), vbCrLf, " <br> ")%><%=
> InsertHyperlinks(myString)%><br>
> &nbsp;</font></p>
>
>
> thanks again.
> Bob, thanks for replying, and what it was showing in the source, was
> the
> link without it being clickable. but with this code it is.
>
> Thanks again.
> "Jeff" <gi*****@adelphia.net> wrote in message
> news:bs******************************@adelphia.com ...
> >I give up. Seems like this one is too easy, yet it keeps eluding me.
> >
> >
> >
> > "Jeff" <gi*****@adelphia.net> wrote in message
> > news:9u******************************@adelphia.com ...
> >> Hey gang.
> >>
> >> i have this
> >>
> >> Response.Write Replace(Rs("Event_Details") & " ", vbCrLf, "<BR>") &
> >> vbCrLf
> >>
> >> coming from access db.
> >>
> >> how can i get that to make a hyperlink clickable as well??
> >>
> >> Thanks
> >>
> >
> >

May 27 '06 #16

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

Similar topics

1
by: Badboy36 | last post by:
Hello user from googlegroups, i made a microsoft access database with front and backend. i created the backend in microsoft access97. for the...
0
by: Ryan Harvey | last post by:
Hi all, I have written a web user control that contains a repeater control. the ItemTemplate for this control is basically 6 Hyperlinks in a row,...
5
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it...
9
by: Leon | last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks. <asp:datalist id="DataList1" runat="server" RepeatColumns="4">...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these...
8
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the...
2
by: Andy | last post by:
Hi, This is one of those things I thought should e easy... I'm programatically trying to set the navigateURL property in a hyperlink in the...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It...
10
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.