Reputation: 22323
My code is work well but i want to send "Item" and "Mode" in encrypted form.any built in method in asp?if not plz suggest alternative solution.
string url = "QueryStringRecipient.aspx?";
url += "Item=" + lstItems.SelectedItem.Text + "&";
url += "Mode=" + chkDetails.Checked.ToString();
Response.Redirect(url);
Upvotes: 0
Views: 1616
Reputation: 13116
Try look here:
You can also use Session
variables.
Related posts:
How can you secure/encrypt your querystring in asp.net?
How can I encrypt a querystring in asp.net?
how to pass encrypted query string in asp.net
How can i encrypt query string parameters in ASP.NET website?
Upvotes: 4
Reputation: 100381
Encrypted or encoded?
To encode strings there is HttpServerUtility.UrlEncode
public string UrlEncode(
string s
)
Parameters
s
Type: System.String
The text to URL-encode.
Return Value
Type: System.String
The URL-encoded text.
To decode HttpServerUtility.UrlDecode
public static string UrlDecode(
string str
)
Parameters
str
Type: System.String
The string to decode.
Return Value
Type: System.String
A decoded string.
Upvotes: 1