Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2005, 01:37 PM
Registered User
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hyperlink/Url in String

I must include a hyperlink in an email message.

The email message is defined as:

Dim message As String = "Click on <link> to log in and view your profile."

Where <link> is login.aspx, for example.

How do I include the <link> inside my message string and also pass
a value in the <link> to be retrieved on the login page?

Thank you for your help.

 
Old September 1st, 2005, 03:23 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Construct another string that holds an anchor tag

str = "<a href = "..."> ..etc " with a query sting in it. Then concatinate both strings

message = "Click on " + str + " to log in and view your profile."


 
Old September 2nd, 2005, 02:40 AM
Authorized User
 
Join Date: Jul 2005
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your message must be set to ContentType Html so that all Mail Readers accept it as Html Message.

By default, Outlook understands hyperlinks in plain text also. Is'nt it?

Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
 
Old September 2nd, 2005, 07:09 AM
Registered User
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you all for your responses. This will solve my problem, and I've learned a lot about hyperlinks, etc.

Just to make sure I've got this correct, here is what I'm doing:

Dim mylink As String = "<a href=""http://www.NCLB HOUSSE/TchrLogin.aspx?SubjectID=mySubjId"">www.NCLB_HOUSS E.</a>"

Dim message As String = "This is the " & mylink & " link."

Now to retrieve the value in SubjectID from the login page:

txtSubjId.Text = Request.QueryString("SubjectID")

Correct?

Thank you very much for your help.

- Sue
 
Old September 2nd, 2005, 08:46 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Looks correct...

 
Old September 2nd, 2005, 08:51 AM
Registered User
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, jbenson001.

Great! Thank you.

- Sue






Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink url too long in data grid. Hughesie78 ASP.NET 2.0 Professional 2 May 12th, 2008 11:54 AM
string being chopped off when passed through url ronny Classic ASP Basics 6 October 30th, 2007 09:53 AM
adding varchar string to hyperlink dgreep PHP Databases 1 February 19th, 2007 05:56 AM
store hyperlink into a string. europhreak Classic ASP Basics 1 February 2nd, 2006 11:16 PM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 04:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.