Invalid/Missing QueryString - How to react?

Discussion in 'ASP .Net' started by Joe Kovac, Jun 25, 2007.

  1. Joe Kovac

    Joe Kovac Guest

    Hi!

    I have many pages that expect query strings. One of the first things to
    do, should be to check if the values of the QueryString are valid.
    But how should I react on invalid/missing QueryStrings? Somehow the page
    itself should stop rendering any controls and just display an error
    message. How would I achieve this? Where should that be done? What are
    other possible solutions?

    Thanks

    Joe
     
    Joe Kovac, Jun 25, 2007
    #1
    1. Advertising

  2. Joe Kovac

    Masudur Guest

    On Jun 25, 7:02 pm, Joe Kovac <> wrote:
    > Hi!
    >
    > I have many pages that expect query strings. One of the first things to
    > do, should be to check if the values of the QueryString are valid.
    > But how should I react on invalid/missing QueryStrings? Somehow the page
    > itself should stop rendering any controls and just display an error
    > message. How would I achieve this? Where should that be done? What are
    > other possible solutions?
    >
    > Thanks
    >
    > Joe


    Hi Joe

    for now i see two solution in my mind...
    #1 check for querystring ... if okay proceed or redirect to a error
    page saying that invalid access
    #2 keep my whole contents in a panel...
    check for querystring ... if okay proceed or display ...
    else hide content and display a error message....
    may be there are some other very smart way...

    Thanks
    Masudur
    http://munnacs.110mb.com
     
    Masudur, Jun 25, 2007
    #2
    1. Advertising

  3. Displa the error message and call Response.End()

    "Masudur" wrote:

    > On Jun 25, 7:02 pm, Joe Kovac <> wrote:
    > > Hi!
    > >
    > > I have many pages that expect query strings. One of the first things to
    > > do, should be to check if the values of the QueryString are valid.
    > > But how should I react on invalid/missing QueryStrings? Somehow the page
    > > itself should stop rendering any controls and just display an error
    > > message. How would I achieve this? Where should that be done? What are
    > > other possible solutions?
    > >
    > > Thanks
    > >
    > > Joe

    >
    > Hi Joe
    >
    > for now i see two solution in my mind...
    > #1 check for querystring ... if okay proceed or redirect to a error
    > page saying that invalid access
    > #2 keep my whole contents in a panel...
    > check for querystring ... if okay proceed or display ...
    > else hide content and display a error message....
    > may be there are some other very smart way...
    >
    > Thanks
    > Masudur
    > http://munnacs.110mb.com
    >
    >
     
    =?Utf-8?B?UmFq?=, Jun 25, 2007
    #3
  4. Joe Kovac

    Joe Kovac Guest

    Raj wrote:
    > Displa the error message and call Response.End()


    And what if I still want to see the master page? Response.End() cancels
    the processing of everything. Even the master page.

    Thanks
    Joe

    >
    > "Masudur" wrote:
    >
    >> On Jun 25, 7:02 pm, Joe Kovac <> wrote:
    >>> Hi!
    >>>
    >>> I have many pages that expect query strings. One of the first things to
    >>> do, should be to check if the values of the QueryString are valid.
    >>> But how should I react on invalid/missing QueryStrings? Somehow the page
    >>> itself should stop rendering any controls and just display an error
    >>> message. How would I achieve this? Where should that be done? What are
    >>> other possible solutions?
    >>>
    >>> Thanks
    >>>
    >>> Joe

    >> Hi Joe
    >>
    >> for now i see two solution in my mind...
    >> #1 check for querystring ... if okay proceed or redirect to a error
    >> page saying that invalid access
    >> #2 keep my whole contents in a panel...
    >> check for querystring ... if okay proceed or display ...
    >> else hide content and display a error message....
    >> may be there are some other very smart way...
    >>
    >> Thanks
    >> Masudur
    >> http://munnacs.110mb.com
    >>
    >>
     
    Joe Kovac, Jun 26, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Buttons Do Not React

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Jul 5, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    525
    Natty Gur
    Jul 6, 2004
  2. diegomrosa
    Replies:
    1
    Views:
    411
    Robert Iver
    Jun 9, 2006
  3. Barry
    Replies:
    5
    Views:
    888
    Barry
    Jan 26, 2007
  4. Replies:
    8
    Views:
    411
    Rolf Magnus
    Jan 11, 2009
  5. elsjaako

    receive and react to MIDI input

    elsjaako, Jan 29, 2009, in forum: Python
    Replies:
    7
    Views:
    1,001
    elsjaako
    Feb 8, 2009
Loading...

Share This Page