I 'm going to populate a gridview with data from stored procedure in SQL server.
I wrote a method which returns a dataset. than I added an object datasource with all parameters.
onbutton click I bind a gridview
But nothing happened.
would you able to tell me what Im doing wrong?
I wrote a method which returns a dataset. than I added an object datasource with all parameters.
onbutton click I bind a gridview
Code:
protected void button1_Click(object sender, EventArgs e)
{
gvLookup.DataBind();
}
would you able to tell me what Im doing wrong?
Code:
<asp:ObjectDataSource ID="AccessDatabase" runat="server"
SelectMethod="SearchCheck" TypeName="Cashiering.AccessDatabase">
<SelectParameters>
<asp:ControlParameter ControlID="txtssn" Name="SSN" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtAmount" Name="nAmount" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtPlan" Name="sPlan" PropertyName="Text"
Type="String" />
<asp:Parameter DefaultValue="0" Name="nMarket" Type="String" />
<asp:ControlParameter ControlID="txtParticipant" DefaultValue=""
Name="sParticipant" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtNumber" Name="cNumber" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtSerNo" Name="sSerNo" PropertyName="Text"
Type="String" />
<asp:Parameter DefaultValue="0" Name="dStart" Type="String" />
<asp:Parameter DefaultValue="0" Name="dEnd" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
Comment