Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4619258
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:24:00+00:00 2026-05-22T02:24:00+00:00

Basically, I can send the user emails. I tried to send him this: MailMessage

  • 0

Basically, I can send the user emails. I tried to send him this:

MailMessage message = new MailMessage()
{
    Subject = "YOURGURU account",
    Body = "Thanks for joining our site. click th link below to validate your account"+
           "<br/>"+
           HttpContext.Current.Request.Url.Host
};

message.To.Add(new MailAddress("makovetskiyd@yahoo.co.uk", "Some name"));
message.IsBodyHtml = true;
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
client.Send(message);

Response.Redirect("CheckYourEmail.aspx");

The HttpContext.Current.Request.Url.Host function appears in the email as “localhost”..but I need it to appear like a real link..that I press and it redirects me. I use visual studio 2010

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:24:01+00:00Added an answer on May 22, 2026 at 2:24 am

    It seems that you are using

    HttpContext.Current.Request.Url.Host

    instead of HttpContext.Current.Request.Url

    For your local dev environment you will be getting localhost, but when you deploy this to some web server, this would correctly update itself to the hosted web server url.

    Ideally, you would have some path that would contain the querystring and then corresponding code in page load to validate and use the querystring.

    Example:

    <br/>"+HttpContext.Current.Request.Url.Host + @"/AccountValidate.aspx?id=SomeId"
    

    Note: You could use the HttpContext.Current.Request.Url also and that would redirect you to the current page with querystring:

    <br/>"+HttpContext.Current.Request.Url + "?id=SomeId"
    

    And then in page load of AccountValidate.aspx or current page:

    string id = Convert.ToString(Request.QueryString["id"]);
    if(!string.IsNullOrEmpty(id))
    ... //Code here to inform the user of successful activation
    

    The important point to consider is that you would need some way to know which user clicked on the activation link, and hence the query string would be of use.

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a site where there user can basically navigate the web
I have a web site with two routes. Basically the user can do one
Basically I need a hosted solution, where one can create an account for a
I'm trying to build a nice contact form, from where a user can send
I have been playing with the Ruby library shoes. Basically you can write a
How can I basically carry out a unique constraint on a string data-type field.
Basically just looking to see if you can capture an image from the webcam
Can we have a SQL query which will basically help in viewing table and
Basically, I would like a brief explanation of how I can access a SQL
How can I bring my RubyCocoa application to the front? Basically I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.