how to validate QueryString?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jassim Rahma

    how to validate QueryString?


    I have an ID which I pass from the QueryString["id"]. The id is integer only
    and I want before performing any action to validate if the Id is valid
    integet.

  • Jassim Rahma

    #2
    Re: how to validate QueryString?

    sorry.. posted in csharp by mistake



    "Jassim Rahma" <jrahma@hotmail .comwrote in message
    news:9033326F-9E53-490A-89A5-82F92386B458@mi crosoft.com...
    >
    I have an ID which I pass from the QueryString["id"]. The id is integer
    only and I want before performing any action to validate if the Id is
    valid integet.

    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: how to validate QueryString?

      You could use the static TryParse method on the Int32 structure to see
      if the string is an integer.


      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m

      "Jassim Rahma" <jrahma@hotmail .comwrote in message
      news:A96839F1-82CB-40A4-841D-3DB0596AB70E@mi crosoft.com...
      sorry.. posted in csharp by mistake
      >
      >
      >
      "Jassim Rahma" <jrahma@hotmail .comwrote in message
      news:9033326F-9E53-490A-89A5-82F92386B458@mi crosoft.com...
      >>
      >I have an ID which I pass from the QueryString["id"]. The id is integer
      >only and I want before performing any action to validate if the Id is
      >valid integet.
      >

      Comment

      Working...