Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have few links created in a asp.net page. When i click any link it redirects me to another page and sample url is below:-
http://localhost:54785/Mobile%20Browser/GetFieldForCreatingNewWorkflow.aspx?Name=CloseMeterConnection[^].

I am using QueryString Here to pass the name of the link clicked.
I want to know how to hide the Querystring part on the URL i.e. "?Name=CloseMeterConnection.

" this part and want to show my url as http://localhost:54785/Mobile%20Browser/GetFieldForCreatingNewWorkflow.aspx[^].
Since i am new to asp.net. I dont have knowledge that much. Kindly provide me the code for it. Thanks in advance.
Posted
Updated 28-Aug-12 1:50am
v2
Comments
pramod.hegde 28-Aug-12 7:54am    
You cannot hide it. But .net provides one more option. You can encrypt it and send it. While in the receiving page, you need to decrypt it and use it.
http://www.codeproject.com/Articles/33350/Encrypting-Query-Strings
Amit Roy 29-Aug-12 1:59am    
can i use server.Transfer. But the problem is, it transfers me to the next page with giving me any option to choose any link

hi read this

One by one comparison between get and Post Method

GET Method:

1.All the name value pairs are submitted as a query string in URL.
It's not secured as it is visible in plain text format in the Location bar of the web browser.

2.Length of the string is restricted.


3.If get method is used and if the page is refreshed it would not prompt before the request is submitted again.

4.One can store the name value pairs as bookmark and directly be used while sharing with others - example search results.


POST Method:

1. All the name value pairs are submitted in the Message Body of the request.

2. Length of the string (amount of data submitted) is not restricted.

3. Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser.

4. If post method is used and if the page is refreshed it would prompt before the request is resubmitted.

5. If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST.

6. Data is submitted in the form as specified in enctype attribute of form tag and thus files can be used in FileUpload input box.

For more refer this link

http://wiki.answers.com/Q/
What_is_the_difference_between_get_and_post_method_in_HTTP
[^]

Some more URL will help you:

http://www.plus2net.com/asp-tutorial/form-diff.php[^]

http://www.cs.tut.fi/~jkorpela/forms/methods.html[^]

regards
sarva
 
Share this answer
 
Comments
Manas Bhardwaj 28-Aug-12 8:35am    
+5
You need URL Rewriting.

Read here:
URL Rewriting with ASP.NET[^]
MSDN: URL Rewriting[^]
 
Share this answer
 
Comments
Manas Bhardwaj 28-Aug-12 8:36am    
Yup, MSDN is always the best option. +5
aarif moh shaikh 21-Oct-14 2:38am    
yes.. MSDN is best forever.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900