Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 encoding problem

Author  Topic 

chiragvm
Yak Posting Veteran

65 Posts

Posted - 2006-10-27 : 06:38:26
hi to all

i want to encoding querystring value so it is not easily readable.
at present i got this type of url in explorer.
www.test.page1.aspx?id=10

but i want to encrypt id's values. so no one can get direct value from url.

Now can you give me suggetion or some coding help for this issue .

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-27 : 06:41:02
Encode into what?
Or do you mean you want to get the parameter value for id key?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-27 : 06:43:29
Response.Write("<br>" & Request.QueryString("id") & "<br>")


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-27 : 08:43:26
Use GUID instead.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-27 : 10:04:02
Instead of doing anything like that, why don't you use asp.net's features like POST method of form to hide the data from the url?

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-27 : 10:14:32
Hey hey hey...
That's way too easy!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-27 : 10:31:20
Yeah...I know !

I just posted it, so that if he is not able to understand your solutions, he will have something simple to look for !

BTW, I thought you would suggest him some complex encryption algo in your unique style !

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

Gyto
Posting Yak Master

144 Posts

Posted - 2006-10-27 : 10:38:46
quote:
Originally posted by Peso

Use GUID instead.


Peter Larsson
Helsingborg, Sweden


Just out of interest, although a GUID isn't easily 'readable', wouldn't that effectively just be substituting '10' for a long unique string of characters instead.....it wouldn't actually be hiding the record value in the database, would it?

So surely u could still get the record value from the url?

...but I'm probably wrong as usual.....lol
Go to Top of Page
   

- Advertisement -