我想简单的c#程序?

时间:2016-06-11 09:37:17

标签: c# facebook

这是aspx代码:

<asp:SqlDataSource ID="SqlDataSourceRegistration" runat="server" ConnectionString="<%$ ConnectionStrings:RegistrationConnectionString %>" OnSelecting="SqlDataSourceRegistration_Selecting" SelectCommand="SELECT * FROM [UserData]"></asp:SqlDataSource>

哪里出现错误

代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class Administrator : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

请帮我解决?

1 个答案:

答案 0 :(得分:0)

您在aspx代码中使用了GridView。您已将GridView1_SelectedIndexChanged事件注册到该GridView 要么删除它,要么将该事件添加到C#代码中。

例如:

 void GridView1_SelectedIndexChanged(Object sender, EventArgs e)  {...}