K
Kyle K.
Environment: ASP.NET 2 on WinXP SP2 w/ VS2005
I have a Databound DropDownList control on a templated page that I would
like to conditionally display as determined by the # of items in the
control.
Using a MultiView control...
Count = 0, display a message (view1)
Count > 0, display DropDownList & Button (view2)
I need the ability to programatically set which view is displayed AFTER
the DropDownList has loaded the data from the database.
I tried placing the code to do this inside the Page_Load() &
(controlName)_DataBound() events, but the Page_Load() event is called
before the data is bound and the (controlName)_DataBound() event doesn't
get called at all (breakpoint not reached when debugging the page).
Not sure if it matters or not, but I am using an ObjectDataSource that
references a DataSet (.xsd).
What method should I use in order to determine which view is displayed
at runtime?
-={ Kyle K }=-
I have a Databound DropDownList control on a templated page that I would
like to conditionally display as determined by the # of items in the
control.
Using a MultiView control...
Count = 0, display a message (view1)
Count > 0, display DropDownList & Button (view2)
I need the ability to programatically set which view is displayed AFTER
the DropDownList has loaded the data from the database.
I tried placing the code to do this inside the Page_Load() &
(controlName)_DataBound() events, but the Page_Load() event is called
before the data is bound and the (controlName)_DataBound() event doesn't
get called at all (breakpoint not reached when debugging the page).
Not sure if it matters or not, but I am using an ObjectDataSource that
references a DataSet (.xsd).
What method should I use in order to determine which view is displayed
at runtime?
-={ Kyle K }=-