ASPAlliance Home
Advertise with us
About Prasad KVNM
Refer this Site
                                               
Home Convert URLs into Hyperlinks KV's Kool ASP
Search
Samples/Articles
Convert URLs into Hyperlinks

Advertisement Management Systems

AdRotator Component

Extending AdRotator Component

Simple Alternative to AdRotator

A more powerful Ad Management System

Opinion Poll

Suggestions/Snippets
Passing Special Characters through URL

Date delimiter for Access and SQL Server

CDBL instead of CSNG

Handling Database Errors

Avoid Partial Updates to the Database

Book Review
C# and the .NET Platform

Favorite Links
ASPLists.com
ASPNG.com
Computer Dictionary
LearnASP.com

Microsoft .NET
Search @ Google
Wrox Press
Freecode.com

Site by Prasad KVNM,
New Jersey, USA
prasad@kunisetty.com
last updated on
22nd Oct, 2001



Convert URLs into Hyperlinks

Many HTML editors and word processors convert URL strings automatically into hyperlinks. For example if you are typing www.aspalliance.com, which is a URL, then these editors and word processors convert the string "www.aspalliance.com" into a hyperlink such as www.aspalliance.com and it will be clickable by the user. To convert a URL string into Hyperlink, manually, you should write it as:
<a href="http://www.aspalliance.com">www.aspalliance.com</a>

HTML editors and word processors are adding these <a href=""></a> tags to your URL strings. But what will you do in the following situation:

You are going to ask your web site visitor to enter a brief description about him. The visitor mentioned their company URL along with some more information in the text area and submits it to the site. You may store it into database. Later you want to display this information in a web page. You retrieved the description and writes it to the active server page. Then the URL should have a hyperlink, it should be clickable.

Just see the following example. The text area contains some text along with two URLs. Just press submit. The text will get displayed in another form where you can't just click the URLs.

No conversion!

Now look here... The same text area with same text. But this time, in the result window, you can click on the URLs. To try, just click on submit button.

Conversion!

Try this with your own text. Test it. Just change the text in the above text area and submit. Please let me know if it fails to convert your URL strings into hyperlinks. I can be contacted at: pkvnm@yahoo.com

Click here to get the source code for converting URL strings into Hyperlinks.



Refer this site ASPAlliance.com |  Contact Us |  Join |  Advertise |  Best Viewed with IE 4.0 or above