服务器代码执行后发布表格 [英] Post Form After Server Code Execution

查看:62
本文介绍了服务器代码执行后发布表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经创建了一个表单,该表单将在执行服务器端代码后发布到另一个表单.我曾经使用onclientClick提交表单(工作良好),但是如果发生任何错误,则表单不应发布.

请让我知道如何解决此问题?

问候,
Aman

Hi All,

I have created a form which will be post to another form after executing the server side code. I had used onclientClick to submit form (working good), But form should not post if any error occurs.

Please let me know that how to resolve this issue?

Regards,
Aman

推荐答案

发表评论后:

您应该在服务器端函数中编写代码,并从客户端调用它,并根据操作的成功或失败从服务器发送回正确的响应.因此,您应该使用AJAX:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=109 [ ^ ]

或将AJAX与JQuery混合使用:
http://weblogs.asp. net/karan/archive/2010/09/12/calling-server-side-method-using-jquery-ajax.aspx [
After your comment :

You should write your code in a server side function and call it from client side and according to the success or failure of the operation send back proper response from server. So you should use AJAX :
http://www.dotnetcurry.com/ShowArticle.aspx?ID=109[^]

Or AJAX mixed with JQuery :
http://weblogs.asp.net/karan/archive/2010/09/12/calling-server-side-method-using-jquery-ajax.aspx[^]

Hope it helps.


这篇关于服务器代码执行后发布表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆