I was able to get the formview bound to the objectdatasource, it works great for the first record, but when i select the next record it gives me error below is all my code, if there is something else that i need to post please let me know.
I opt'd for using formview since it has paging ability.. But now that i got that working, selecting the next record gives me an error.
This is what i have as my button event:
protected void btnSearchHealthRecords_Click(object sender, EventArgs e)
if (ddlVehNum.SelectedValue == "0")
rfvVehNum.IsValid = false;
ObjectDataSource1.SelectMethod = "HealthRecords";
ObjectDataSource1.SelectParameters.Add("vehiclenum", TypeCode.String, ddlVehNum.SelectedValue.ToString());
ViewState["MethodName"] = "HealthRecords";
FormView1.Visible = true;
Session["btClick"] = "5";
sn.Visible = true;
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
View Complete Post