i am going to minimize no. of code lines and directly bind instead of add columns when i do this show error
public DataTable vehcile(string id)
{
Entities1 wr = new Entities1();
GridView1.DataSource=wr.spvechile(id);
GridView1.DataBind();
return ;
}
protected void Page_Load(object sender, EventArgs e)
{
if(!this.IsPostBack)
{
this.vehcile(id);
}
}
this show error
Error 10 An object of a type convertible to 'System.Data.DataTable' is required
Error 9 The name 'id' does not exist in the current context now how i return data and how i set data source?
any solution's?