[RESOLVED] String coming from the datagrid problem
Hello everyone, I have a problem regarding upon passing a string from datagrid to the next form. I have a datagrid with hyperlink field and I populate the data from my database. My problem is that everytime I pass the field and if it contains '&' the data will stop until there. Anyone knows and encounter same problem as what I have? This is how i link the data:
Code:
DataNavigateUrlFormatString="display.aspx?ClientCode={0}&CompanyName={1}&CityName={2}&CountryName={3}&POBox={4}&TelNo1={5}&TelNo2={6}&FaxNo={7}&Email={8}&Web={9}&Details={10}"
And this is how i call it to next form
Code:
Dim CName As String = Request.QueryString("CompanyName")
Dim CityName As String = Request.QueryString("CityName")
txtCoName.Text = CName
txtCity.Text = CityName
Is there any option how to make the '&' readable to the next form? Everytime the data has '&' it will stop there. Like for example, "AB & A Company" it will result only "AB". Any help guys. God Bless and have a nice day. :)
Re: [RESOLVED] String coming from the datagrid problem
Hey,
In order to get this to work, you would need to UrlEncode the data from the DataGrid, and then UrlDecode at the other end.
Hope that helps!!
Gary
Re: [RESOLVED] String coming from the datagrid problem
thanks gep13. It really helps. Sorry for the very delayed reply on this. Have a nice day. :)