Please Solve My ASP.NET problem.?

Soul Pure

New member
hi i am making a project in asp.net which contain 6 text boxes and 1 grid view. i want that i DELETE my entries directly from grid view ... i am using this code:


protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{

GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
TextBox empcode = (TextBox)row.FindControl("txtempcode");
SqlConnection con = new SqlConnection(con1);
con.Open();
SqlCommand cmd=new SqlCommand ("delete from twbs2 where empcode ='"+txtempcode +"'",con );
cmd.ExecuteNonQuery();
con.Close();
bind();

}


but when i execute this code TWO ERROR occurs :

Error1'TextBox' is an ambiguous reference between 'System.Web.UI.WebControls.TextBox' and 'System.Windows.Forms.TextBox'C:\Documents and Settings\tej\My Documents\Visual Studio 2008\WebSites\aspoperations\Default.aspx.cs809C:\...\aspoperations\

Error2'TextBox' is an ambiguous reference between 'System.Web.UI.WebControls.TextBox' and 'System.Windows.Forms.TextBox'C:\Documents and Settings\tej\My Documents\Visual Studio 2008\WebSites\aspoperations\Default.aspx.cs8028C:\...\aspoperations\


I am not able to Solve this problem text box error is coming please give me the solution.
Thanks
 
Back
Top