vb.net - Condition is never met when no queryString is presented -


either none of these presented or 1 presented. when none presented condition never hit

    private _page string = httputility.urlencode(httpcontext.current.request.querystring("page"))     private _pge string = httputility.urlencode(page.routedata.values("page"))      private function getpage() string         dim ret string = ""         if string.isnullorempty(_page) = true andalso string.isnullorempty(_pge) = true             ret = 1         elseif string.isnullorempty(_page) = false andalso string.isnullorempty(_pge) = true             ret = _page         elseif string.isnullorempty(_page) = true andalso string.isnullorempty(_pge) = false             ret = _pge         end if         return ret     end function 

might cozed . return _page

try ..

private function getpage() string         if string.isnullorempty(_page) = true andalso string.isnullorempty(_pge) = true             _page = 1             return _page         elseif string.isnullorempty(_page) = false andalso string.isnullorempty(_pge) = true             return _page         elseif string.isnullorempty(_page) = true andalso string.isnullorempty(_pge) = false             return _pge         else             return _page         end if      end function 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -