Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 06, 2006 02:35 PM by Aidy
Jan 06, 2006 01:07 PM|LINK
On Page : Banner.ascx.cs it has a line of code:
tabs.SelectedIndex = (Request["index"]==
I dont understand what it does can some one help me .
Also on HTML : it has <%=Global.GetApplicationPath(Request)%> Where does the parameter Request come from
Jan 06, 2006 02:35 PM|LINK
"statement ? value1 : value2"
does is evaluate to value1 is the statement is true, otherwise it evaluates to value2. In your example, if Request["index"] is a null value (Request["index"]==null returns True) then SelectedIndex will be 0, if it isn't a null value then SelectedIndex will
be Convert.ToInt32(Request["index"]). In other words, Request["index"] as a number.
Request is actually a member of the Page object. You can shorten it to just Request but its full name is Page.Request. The Request object is a container for items on the query string, items sent as part of a Form submission, items sent as cookies and some
server variables also.