Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. QueryString

QueryString

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jabeerbe
    wrote on last edited by
    #1

    Hi Please find which Cause the problem Response.Redirect("PrintQuote.aspx?Print=" + grdVwAgentQuote.SelectedRow.Cells[7].Text+" & Quote="+TextBox1.Text); dataPrinting = adapterprinting.GetData(int.Parse(Request.QueryString["Print"].ToString()), int.Parse(Request.QueryString["Quote"].ToString())); When i just call one querystring. Its Working Fine. But if i call both the QueryString Then the Null Exception is showing on the Print. But if i pass only Print as queryString its working Fine.Please advice to solve the issue.

    Regards, A Jabeer Ali

    G 1 Reply Last reply
    0
    • J Jabeerbe

      Hi Please find which Cause the problem Response.Redirect("PrintQuote.aspx?Print=" + grdVwAgentQuote.SelectedRow.Cells[7].Text+" & Quote="+TextBox1.Text); dataPrinting = adapterprinting.GetData(int.Parse(Request.QueryString["Print"].ToString()), int.Parse(Request.QueryString["Quote"].ToString())); When i just call one querystring. Its Working Fine. But if i call both the QueryString Then the Null Exception is showing on the Print. But if i pass only Print as queryString its working Fine.Please advice to solve the issue.

      Regards, A Jabeer Ali

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      When you try to read the value using the name "Quote", you will not find it as the name is " Quote". Remove the extra spaces around &. Also, you should use Server.UrlEncode to encode the values before you put them in the query string.

      --- single minded; short sighted; long gone;

      J 1 Reply Last reply
      0
      • G Guffa

        When you try to read the value using the name "Quote", you will not find it as the name is " Quote". Remove the extra spaces around &. Also, you should use Server.UrlEncode to encode the values before you put them in the query string.

        --- single minded; short sighted; long gone;

        J Offline
        J Offline
        Jabeerbe
        wrote on last edited by
        #3

        Can you send some Sample Code for Server.URLEncode. Because it gives error to me

        Regards, A Jabeer Ali

        G 1 Reply Last reply
        0
        • J Jabeerbe

          Can you send some Sample Code for Server.URLEncode. Because it gives error to me

          Regards, A Jabeer Ali

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Example: Response.Redirect("Page.aspx?something=" + Server.UrlEncode(someValue) + "&other=" + Server.UrlEncode(otherValue));

          --- single minded; short sighted; long gone;

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups