|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class fgly : System.Web.UI.Page
{
string SqlStr;
Class1 link = new Class1();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
SqlDataSource.InsertParameters.Clear();
SqlDataSource.InsertParameters.Add("sj", DataTime.now.ToString());
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
Response.Write("感谢您的留言");
}
}
上面的是源代码,但是会出现以下这个错误
编译器错误信息: CS0120: 非静态的字段、方法或属性“System.Web.UI.WebControls.SqlDataSource.InsertParameters.get”要求对象引用
,谁可以帮我解决下,谢谢了 |
|