求extjs form提交后 将返回值赋值于前台的文本框?
表单提交
AddFcqdForm.form.submit({ url: "URL/fhxx/savefcqkinfo_fhxx.aspx", method: 'post',
success: function(response) {
alert(response.responseText);//undified Ext.getCmp("save").disable(); Ext.getCmp("save").setText("更新(S)"); AddFcqdForm.disable();
Ext.getCmp("edit").enable(); Ext.getCmp("printpre").enable();
},
failure: function(response) {
Ext.Msg.alert("警告", "数据保存失败,请稍后再试!");
}
});
savefcqkinfo.aspx 文件代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="savefcqkinfo_fhxx.aspx.cs" Inherits="URL_fhxx_savefcqkinfo_fhxx" %>
savefcqkinfo.aspx.cs代码
if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0][0].ToString()))
{
result = ds.Tables[0].Rows[0][0].ToString();
result = Convert.ToString(Convert.ToInt64(result) + 1);
}
else
{
result = Session["companyid"] + System.DateTime.Now.ToString("yyyyMMdd") + "001";
}
现在要将result返回给前台的文本框