dcsimg
Results 1 to 3 of 3

Thread: [RESOLVED] String coming from the datagrid problem

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [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.
    Last edited by shyguyjeff; May 10th, 2009 at 05:06 AM.

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,966

    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

  3. #3

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width