how can we execute store procedure by using sqldatasource
Programmatically??
I want to bind it with gridview
i am using like this
Collapse |
Copy CodesqldsSiteList.SelectCommandType = SqlDataSourceCommandType.StoredProcedure sqldsSiteList.SelectCommand =
"Stp_RmsAdmin_GetsitesBycustomization" Collapse |
Copy CodesqldsSiteList.SelectParameters.
Add(
"@CustomerID", TypeCode.Int32, ddlCustomer.SelectedValue) sqldsSiteList.SelectParameters(
0).Direction = ParameterDirection.Input
Collapse |
Copy CodesqldsSiteList.SelectParameters.
Add(
"@PageIndex", TypeCode.Int32,
"1") sqldsSiteList.SelectParameters(
1).Direction = ParameterDirection.Input GridView1.DataBind()
when i bind it to grid it gives me error Collapse |
Copy Code"Procedure or Function 'Stp_RmsAdmin_GetsitesBycustomization' expects parameter '@CustomerID', which was not supplied."