Setting the enabled to false will wipe the control right
off the form, the view state has very little to do with
refresh speed in most circumstances, although u can get a
bit more speed with no view state. The IsPostBacks are
the ones to look at, u only really want to fill the grid
from your datasource on the first load if your view state
is on. if u turn the view state off then u have to
populate it every time. i would suggest leaving view
state on and fill if(!IsPostBack)
>-----Original Message-----
>Hello Group,
> I came across this question and would
like to know the
>solution for the same:
>
>Q>You are creating an ASP.NET page for your company. You
create a DataGrid
>control that displays past purchases made by the user.
The DataGrid control
>is populated from an existing database when the page is
created.
>
>The page contains TextBox controls that allow users to
update their personal
>information, such as address and telephone number. You
need to ensure that
>the page is refreshed as quickly as possible when users
update their contact
>information.
>
>What should you do?
>
>A. Set the Enabled property of the DataGrid control to
false.
>B. Set the EnableViewState property of the DataGrid
control to false.
>C. Write code in the Page.Load event handler that
populates the DataGrid
>control only when the IsPostBack property of the page is
false.
>D. Write code in the Page.Load event handler that
populates the DataGrid
>control only when the lsPostBack property of the page is
true.
>
>Thanks,
>Chris.
>
>
>.
>
|