Last post Jan 06, 2006 10:35 AM by Aidy
Jan 06, 2006 09:07 AM|anhnguyen|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 10:35 AM|Aidy|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.