Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string s = Convert.ToString(Request["client_id"]);


For example Client_id value is "venkat,kumar,9494949494,20000,hyderabad";

I just want to display the data in this Page and save it to the Database.
Posted
Comments
TrushnaK 20-Dec-13 7:30am    
information is not enough. add more information what you want exactly.

Try
C#
string s = Convert.ToString(Request["client_id"]);
string[] parts = s.Split(',');
if (parts.Length >= 5)
   {
   string city = parts[4]  //Hyderabad in your example
   ...
   }
 
Share this answer
 
Hi Try like this, might help you..



C#
string s = Convert.ToString(Request["client_id"]);
       string[] array = s.Split(',');
       //"venkat,kumar,9494949494,20000,hyderabad";
       if (array.Length == 5)
       {
           txtFirstName.Text = array[0];
           txtLastName.Text = array[1];
           txtPhone.Text = array[2];
           txtOthers.Text = array[3];
           txtCity.Text = array[4];

       }
       // for saving to database, read the modified values from the text boxes..
 
Share this answer
 
Comments
Venkat Kumar chigulla 20-Dec-13 8:31am    
I just want to hide the Querystring values in URL, can you tell me in a simple way to do this because In the above code i took Querystring values from ASP page to APSX page.
Karthik_Mahalingam 20-Dec-13 8:57am    
you can do encryption/decryption of url string.. so that in the url it will look like an unreadable string of data..
refer this article:
http://www.codeproject.com/Articles/33350/Encrypting-Query-Strings

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