C# 处理表单时,如何获取更新的FormView值?

C# 处理表单时,如何获取更新的FormView值?,c#,asp.net,formview,C#,Asp.net,Formview,在ItemUpdate上,我可以检索字段值,但不能仅检索更新的值 有没有比下面的方法更好的方法 protected void fwHotelDetails_ItemUpdating(Object sender, FormViewUpdateEventArgs e) { TextBox tbName = (TextBox)fwHotelDetails.Row.FindControl("input_name"); MessageLabel.Text = "This works..."

在ItemUpdate上,我可以检索字段值,但不能仅检索更新的值

有没有比下面的方法更好的方法

protected void fwHotelDetails_ItemUpdating(Object sender, FormViewUpdateEventArgs e)
{
    TextBox tbName = (TextBox)fwHotelDetails.Row.FindControl("input_name");
    MessageLabel.Text = "This works..." + tbName.Text;
}

嗯。事件处理程序的第二个参数(FormViewUpdateEventArgse)具有以下属性:

  • 钥匙
  • 新价值观
  • 旧价值观
更多关于

希望这有帮助