How to make query string non editable?

Posted by Laghaterohan under Regular Expressions on 11/10/2010 | Points: 10 | Views : 4490 | Status : [Member] | Replies : 4
Hello,

In my application when a user enters a roll no say 123 and press view button a new window open which shows the report of the member 123 . However on the top it displays the url which also shows the parameter
like ..... . aspx?parametername= xyz&secondparameter= abc

I want this url be readonly...ie non editable.. how to do this?

I am using following code to redirect user to display required report :

  ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "Test", "javascript:window.open('MyPage.aspx?report_name=MyReport&roll_number=" + roll.Text + "');", true);



Thanks!!

Best Regards,
Rohan Laghate



Responses

Posted by: Vuyiswamb on: 11/10/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
The only option here was to Hide the URl , but because of Phishing in IE8 it has been removed. So you cannot do anything with this i am sorry

Thank you for posting at Dotnetfunda
[Administrator]

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: prashant12-7256 on: 11/10/2010 [Member] Starter | Points: 25

Up
0
Down
You Can use Server.Transfer

Like this :

Server.Transfer("~/MyPage.aspx?report_name=MyReport&roll_number=" + roll.Text);       


Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 11/10/2010 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,

My suggestion is using Session object you can achieve.

Set your Roll no into Session Object.In page load call the session object value into your condition.

Cheers :)

Thanks,
T.Saravanan

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prasham on: 11/10/2010 [Member] Starter | Points: 25

Up
0
Down
Hello,

One more option is you can encrypt the querysting parameters and then send.

Thanks and Best Regards
Prasham

Laghaterohan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response