troubleshooting Question

Dynamic URL in ASP.NET

Avatar of KarenH1
KarenH1 asked on
HTMLASP.NETWeb Applications
7 Comments2 Solutions555 ViewsLast Modified:
I am using ASP.NET 3.5 (VB) to put a link in an email so a user can confirm their subscription.

I want the test link in the email to redirect to:

http://test/UserAccountStatus.aspx?action=confirm&id=4651

My code is:

Dim strURL As String = "UserAccountStatus.aspx?action={0}&id={1}"

Dim strDynamicURL As String = String.Format(strURL, "confirm", txtBid_User_ID.Text.ToString.Trim())

....

' I want to pass this in the email body:
strEmailBody &= "<a href=""<%= strDynamicURL %>""> test</a><br>"

I can't get the above quoted string to resolve correctly in the received email.

Can I do it this way?  Please be very specific in your answer and provide VB code sample.  Thanks.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros