Karthikeyan M Karthikeyan M - 1 month ago 4x
SQL Question

Grid View Insert Query Error

i got grid view in asp.net,

while i am trying to create

protected void add_button(object sender, EventArgs e)
SqlDataSource1.InsertParameters["Name"].DefaultValue = ((TextBox)GridView1.FooterRow.FindControl("Txt1")).Text;

SqlDataSource1.InsertParameters["CountryNotes"].DefaultValue = ((TextBox)GridView1.FooterRow.FindControl("Txt2")).Text;


while i build the solution i got the error as below

"'TextBox' is an ambiguous reference between
'System.Web.UI.WebControls.TextBox' and 'System.Windows.Forms.TextBox

how to resolve this


System.Windows.Forms is used in Windows-based applications. Try removing

using System.Windows.Forms;