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.
anhnguyen
Member
35 Points
7 Posts
Dont under stand tabs.SelectedIndex = (Request["index"]==null) ? 0 : Convert.ToInt32(Request["ind...
Jan 06, 2006 01:07 PM|LINK
On Page : Banner.ascx.cs it has a line of code:
tabs.SelectedIndex = (Request["index"]==
null) ? 0 : Convert.ToInt32(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
Thanks
Anh
Aidy
Contributor
3585 Points
711 Posts
Re: Dont under stand tabs.SelectedIndex = (Request["index"]==null) ? 0 : Convert.ToInt32(Request[...
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.