One time link for registering RRS feed

  • Question

  • User223215238 posted
    Hy Guys, I'm new at coding in asp .net and I really need help on this one. I have a register.aspx page and I need to make another page to control this one. Something like hashregister.aspx to create a link for register.aspx for just one time usage. Is this possible in asp. Net . Please help me. I have searched but all that I saw was just e mail recovering
    Saturday, January 9, 2016 4:00 AM


  • User-219423983 posted

    Hi LucasSaraiva,

    I think you could achieve your goals. Maybe you have read the following article. As it shows, you could have create a GUID to be the “ActivationCode” and add it to the URL of “register.aspx” as a parameter when the “hashregister.aspx” is loaded.

    Then, when the page “register.aspx” is first loaded, you could get the GUID and then delete the “ActivationCode” from the database.

    The following code is about “hashregister.aspx” and you could have a look.

            protected void Page_Load(object sender, EventArgs e)
                if (!IsPostBack)
                    string activationCode = Guid.NewGuid().ToString();
                    //save the activationCode to the database
                    HyperLink1.NavigateUrl = string.Format("register.aspx?ActivationCode={0}", activationCode);


    Best Regards,

    Weibo Zhang

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 11, 2016 1:54 AM