[Code=cpp]
void GridView1_DataB ound(object sender, EventArgs e)
{
DropDownList ddl = (DropDownList)G ridView1.FindCo ntrol("drpmarks ");
DataTable dt= ClassLibrary1.C lass1.FetchMark s( 21);
ddl.DataSource = dt;
ddl.DataTextFie ld = "Marks";
ddl.DataValueFi eld = "employeeid ";
ddl.DataBind();
}
[/code]
when i run iam getting error as null reference . can any body tell what is the problem
void GridView1_DataB ound(object sender, EventArgs e)
{
DropDownList ddl = (DropDownList)G ridView1.FindCo ntrol("drpmarks ");
DataTable dt= ClassLibrary1.C lass1.FetchMark s( 21);
ddl.DataSource = dt;
ddl.DataTextFie ld = "Marks";
ddl.DataValueFi eld = "employeeid ";
ddl.DataBind();
}
[/code]
when i run iam getting error as null reference . can any body tell what is the problem
Comment