News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
 <asp:Button ID="btnRefresh" runat="server" Text="Button" /> <asp:GridView ID="gvCustomers" runat="server"
EnableViewState="False" OnDataBinding="gvCustomers_DataBinding">
</asp:GridView>

You disable view state to improve performance. You need to ensure that the page is updated to display the latest data when the user clicks the refresh button. Which code segment should you use?

  1. protected void Page_PreInit(object sender, EventArgs e)
    {
    if (!IsPostBack)
    {
    gvCustomers.DataSource = GetCustomers();
    gvCustomers.DataBind();
    }
    }
    
  2. protected void Page_Load(object sender, EventArgs e)
    {
    gvCustomers.DataSource = GetCustomers();
    gvCustomers.DataBind();
    }
    
  3. protected void gvCustomers_DataBinding(object sender, EventArgs e) {
    gvCustomers.DataSource = GetCustomers();
    gvCustomers.DataBind();
    }
    
  4. protected void Page_PreRender(object sender, EventArgs e) {
    if (!IsPostBack)
    {
    gvCustomers.DataSource = GetCustomers();
    gvCustomers.DataBind();
    }
    }
    
Answer: Answer is b
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;