Repeater 添加编辑
删除的功能我已经解决了protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
int i = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "delete")
{
string aa = "Data Source=JZH-PC;Initial Catalog=OnlineVoteDB;Integrated Security=True";
SqlConnection con = new SqlConnection(aa);
string sql = "delete from Users where UserID='" + i + "'";
SqlCommand cmd = new SqlCommand(sql, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Repeater1.DataBind();
}
求解 编辑和添加如何实现呢 --------------------编程问答-------------------- 点击添加和编辑页面跳转。 --------------------编程问答-------------------- 添加和编辑是比删除还要困难的 你删除都弄出来了 为什么添加和编辑不会呢???
--------------------编程问答-------------------- 有个添加页面或者模块。点击按钮后 重新绑定Repeater就行了
编辑的话 在前台直接跳转到新页面 xx.aspx?id=<% Eval("")%>
补充:.NET技术 , ASP.NET