文件下载地址包含sql2k5的mdf 请自行附加:https://files.cnblogs.com/iCaca/SqlOutputParameter.rar

createtable 是sql2k5的语法 2k可能会报错 请自行修改


END



最为关键的事件
void SqlDataSource2_Inserted(object sender, SqlDataSourceStatusEventArgs e)
    {
        SqlDataSource2.SelectParameters[0].DefaultValue = e.Command.Parameters[2].Value.ToString();
        FormView1.ChangeMode(FormViewMode.Edit);
        Page.DataBind();
    }

 ObjectDataSource原理相同 插入完后 取e.Command.Parameters 的值

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2020-01-03
猜你喜欢
  • 2021-11-05
  • 2021-08-17
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2021-10-09
相关资源
相似解决方案