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:ObjectDataSource SelectMethod="GetProductByProductId" ID="odc" runat="server" TypeName="ProductDAL">
<SelectParameters>
<asp:Parameter Name="productId" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>

The page will be called with a query string field named pid. You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method. What should you do?

  1. Replace the asp:QueryStringParameter with the following declaration.

    <asp:QueryStringParameter DefaultValue="pid" Name="productId" Type="Int32" />
  2. Replace the asp:QueryStringParameter with the following declaration.

     <asp:QueryStringParameter QueryStringField="pid" Name="productId" Type="Int32" />
  3. Add the following event handler to the Selecting event of the ObjectDataSource control.

    protected void odc_Selecting(object sender,ObjectDataSourceSelectingEventArgs e)
    {
    }
  4. InputParameters["pid"] = Request.QueryString["productId"]; }
    
  5. Add the following code segment to the page's code-behind.

    protected void Page_Load(object sender, EventArgs e)
    {
    odc.SelectParameters.Add("productId", Request.QueryString["pid"]);
    }
    
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.

;