2016-09-09 5 views
1

私はasp.netでgridviewを持っています。グリッドビュー挿入クエリエラー

私は次のように新しいデータを挿入するためにそれを参照しようとしています:私は、ソリューションを構築するとき

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; 

    SqlDataSource1.Insert(); 
} 

私はこのエラーを取得する:

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

は、どのように私はこの問題を解決することができますか?

答えて

0

System.Windows.Formsは、Windowsベースのアプリケーションで使用されます。 削除を試す

using System.Windows.Forms; 
関連する問題