how can remove querystring space when go to one page to another page

Posted by Bhuwan87rawat under ASP.NET on 12/29/2012 | Points: 10 | Views : 1559 | Status : [Member] | Replies : 2
hello sir
I am application i find amc_name and amc_id with help of viewstate like this
string name = ViewState["Amc_Name"].ToString();
string id = ViewState["Amc_ID"].ToString(); and with these two value i goto another page like that dynTable += "<a href=mfnews.aspx?amcid=" +id + "&amc_name=" + name + ">more</td>";
and i go to another page with querystring

string query_string = HttpContext.Current.Request.QueryString.ToString()
but in this string name is not show proper only fist name show not full name

how can remove query_string space..........




Bhuwan Rawat




Responses

Posted by: Shubham on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
i m not sure about this bro!!!!
only tell u one thing
if u give space on like href="+ id+" so dont give space between "+" and id...

Thanks&Regards:-
Shubham Choudhary
Software Engineer
www.facebook.com/shubham.kunar

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

Posted by: Shipramaurya on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
You can replace your code

string name = ViewState["Amc_Name"].ToString();
string id = ViewState["Amc_ID"].ToString();


with

string name = ViewState["Amc_Name"].ToString().Trim();
string id = ViewState["Amc_ID"].ToString().Trim();



@Shipra - S.M. Techie

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

Login to post response