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

  • Home
  • SEARCH
  • 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 6075227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:28:15+00:00 2026-05-23T10:28:15+00:00

I have written code which grabs a pin number from the URL, then it

  • 0

I have written code which grabs a pin number from the URL, then it encrypts the pin number. I know want to put the encrypted “Key” back in the URL instead of the Original Pin. How can this be done?

I grab the Pin by:

string Pin = Request.QueryString["PIN"];

Is there an opposite of this to put it back in the URL?

Many thanks.


Thank you for your feedback.
Yes I am aware of this but it is ok as it is just for learning purposes. Sensitive information will not be used.

It is just a little program I am working on.

It now works, the only problem is that after using:

Response.Redirect("page.aspx?key=" + encryptedKey);

I cannot seem to display anything on the page; Updating a label for example.

  • 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-23T10:28:16+00:00Added an answer on May 23, 2026 at 10:28 am

    You will have to redirect to a page with an ‘adjusted’ querystring;

    var encryptedKey = EncryptPin(Request.QueryString["PIN"]);
    Response.Redirect("page.aspx?key=" + encryptedKey);
    

    However, information such as this should not really be sent around in a querystring, even if it is encrypted. Use Session, or even better, a proper Session Manager and store information within that.

    I personally never store anything in querystring, but have to admit, it may have to happen in some scenarios.

    Thinking a little more about this, I note that you are obviously sending the ‘Pin’ of your user within the current querystring to another page. Please think about the security considerations of this. To add to my point above about perhaps not using querystring for some information;

    You should MOST DEFINATELY NOT use it for sensitive information such as this.

    This will be stored in various places, easily accessible to anyone that cares to look and could lead to a compromise of the user’s account.

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

Sidebar

Related Questions

I have some code which fetches an XML file from a URL and then
I have written code in C# which is exceeding page width, so I want
I have written a code which makes a border of a div orange then
I have written the code which downloads the file from FTP server. Since I
I have written following code which generates a browse and upload button.i want to
I have written a php code which will get one id from database and
I have written code which should call MSSQL 2005 procedure from my servlet. The
I have written some code which extracts and invoice from various hashes, arrays, arrays
I have written a custom server control which (pseudo-code) looks like public class MyCustomCtrl
I have some code I've written in PHP for consuming our simple webservice, which

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.