ASP.NET - 是否有可能触发服务器code回传? [英] ASP.NET - Is it possible to trigger a postback from server code?

查看:172
本文介绍了ASP.NET - 是否有可能触发服务器code回传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能以编程方式触发服务器code在ASP.NET回发?我知道这是可以做到的Response.Redirect一个或Server.Transfer的重定向到一个页面,但有来触发服务器code(回发到同一页面的方式的的不使用JavaScript弄虚作假提交表单)?

Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code (i.e. without using javascript trickery to submit a form)?

推荐答案

Asp.net回发是从客户端发起(通常形成提交)。我不知道你想达到什么目的。一些服务器端页面事件已经执行的生命周期和你正在做什么的是提高$ P $再次pvious事件处理程序。

Asp.net Postbacks are initiated from the client (typically form submission). I am not sure what you are trying to achieve. Some of the server side page lifecyle events are already executed and what you are trying to do is raise the previous event handlers again.

这篇关于ASP.NET - 是否有可能触发服务器code回传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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