i am passing a query string on button click with 2 parmetrs in which value of 1st one is from a drop downlist and end value from a textbox the code is
Response.Redirect("Default2.aspx?name="+Server .UrlEncode (this.DropDownList1.Text)+"&location="+Server .UrlEncode (this.TextBox1.Text));
but on the navigated page its is showing space b/w the two values this is like
http://localhost:1871/searching_test/Default2.aspx?name=Cardiologist++++++++++++++++++++++++++++++++++++++&location=delhi
why it is showing so many spaces b/w two values. i have tried it without url encode too but no solution.
someone pls help me.
Thanks in advance
Loading
Posted Aug 11, 2010, 5:35 AM
i have posted mine new prob related to textboxwater mark extender. please see that too.
thanks again
Madhu KPosted Aug 11, 2010, 5:32 AM
but no need to change to nchar(20)...
update that particular item in database without spaces.... so that later if you want to enter upto 50 characters you can...
Any how if you hav got problems with your db..
you can remove white spaces by trim().....
Response.Redirect("Default2.aspx?name=" + Server.UrlEncode(this.DropDownList1.Text.TrimEnd()) + "&location=" + Server.UrlEncode(this.TextBox2.Text));
Posted Aug 11, 2010, 4:42 AM
wht if later on i need to enter a large value in ddwnlist more than 20 .
and thanks again.
Posted Aug 11, 2010, 4:37 AM
i think i have made the table definition correctly. ( i mean type and size of table column. )
i have taken it as
nchar(50).
should i reduce it to 20. pls reply soon
Madhu KPosted Aug 11, 2010, 4:28 AM