473,394 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Hyperlink as string question

Hello

I am trying to create a standard HTML email (SMTP) to be sent to users that would end in the sender's Web URL, as in: http://www.mysite.org

(I declared 'link' as a string and used it earlier in my code, so I don't need to declare it again). I was going to code something like:

Expand|Select|Wrap|Line Numbers
  1. link = "<a href=""http://www.mysite.org"></a>"
but I get an 'Expression Expected' error under that final forward stroke.

Thanks for any advice.

Bluenose
Feb 13 '17 #1

✓ answered by Frinavale

Switch the double quotes to single quotes inside around the URL in the href attribute.

You may want to add content to your link too.

Like this:
Expand|Select|Wrap|Line Numbers
  1. link = "<a href='http://www.mysite.org'>http://www.mysite.org</a>"

1 1266
Frinavale
9,735 Expert Mod 8TB
Switch the double quotes to single quotes inside around the URL in the href attribute.

You may want to add content to your link too.

Like this:
Expand|Select|Wrap|Line Numbers
  1. link = "<a href='http://www.mysite.org'>http://www.mysite.org</a>"
Feb 14 '17 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Tmenke | last post by:
Is there a way to superscript a single character in a string for example to show a number raised to a exponent ? Eg lblResult.Caption = " 52 in4 " Where the 4 would be superscripted ? ...
2
by: pemigh | last post by:
If I type www.microsoft.com into the control txtSearchString which is bound to a hyperlink field, I can click it and automatically zoom off to the web page. But if I try to set the field with...
51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
7
by: David Schwartz | last post by:
I have a string A, and I want to write a substring (of varying lengths) starting at the beginning of A, to another string. Can someone show me how to do that?
1
by: Joo Park | last post by:
How do you have a hyperlink that will open up a new window which passes in selected items from a listbox that is on the same page as the hyperlink using <asp:Hyperlink>? thx in advance!
2
by: MrMike | last post by:
I am attempting to pass a parameter named "BackURL" into a asp:Hyperlink HTML control as shown below. "BackURL" is actually a variable defined in the page's code-behind. However, my current...
3
by: Matthias S. | last post by:
Hi, I've got a DataGrid which is displayed within a CustomerDetails page. The CustomerDetails data (including the data for the grid) is loaded using a QueryString (Item CustomerID) which is...
1
by: Jason Huang | last post by:
Hi, In my ASPNet 2.0 C# web form, there's a <asp:HyperLink ID="HyperLinkA" ... NavigateUrl="http://MyIP/MyFolder/MySubFolder"TestLink </asp:HyperLink> My question is how to config the...
1
by: Jason Huang | last post by:
Hi, In my ASPNet 2.0 C#.Net, I have a string manipulation for a HyperLink as string strHLink= "<a href=\"" + HyperLink1.NavigateUrl.ToString() + "\">" + HyperLink1.Text.ToString() + "</a>" ...
1
by: kevinridge | last post by:
Hello, I have confusing string question. I have a string like this (example): <?php $a = " {FILE: hello} hello contents {FILE: hello2} hello2 contents "; ?>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.