Display page when no querystring is present

hallrain

New Member
I have a page which requires me to have a gameweek id on page load to run specific methods.This is parsed via the query string, and retrieved with the following:\[code\]gameweekID = Request.QueryString["gameweekID"];\[/code\]For example:\[code\]page1.aspx?gameweekID=1\[/code\]My issue is however on occasions where the url is page1.aspx, where no querystring is provided. How can I default the page to gameweekID = 1, instead of getting the error \[code\]Procedure or function 'GetPredictions' expects parameter '@gameweekID', which was not supplied.\[/code\]
 
Back
Top