如何设置AutoPostBack = false? [英] How set AutoPostBack = false ?

查看:96
本文介绍了如何设置AutoPostBack = false?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,



我想在Button Property中设置Autopostback = false。有可能这样设置吗?



如果我这样设置我想要执行以下代码



如果(!Ispostback)

{

进入这里

}

hi friends,

i want set Autopostback = false in Button Property. is it possible to set like that?

if i set like that i want perform below code

if(!Ispostback)
{
enter here
}

推荐答案

按钮控件没有设置AutoPostback属性,因为控件的目的是回发...

您可以执行以下操作之一:

1.使用标准输入按钮

2.为 OnClientClick [ ^ ]会在您需要时阻止回发
Button control has no AutoPostback attribute to set as the purpose of the control is to post back...
You can do one of these:
1. Use a standard input button
2. Write event handler for OnClientClick[^] that will block postback whenever you need


您能否进一步阐述您的问题?什么目的?你想在点击时将控制权转移到服务器端吗?或者你想调用客户端方法onclick?
can you please elaborate your question further? what is the purpose? do you want to shift control to server side on click? or do you want to invoke client side methods onclick?


你可以使用:





//和脚本:
you can use:


// and script:


这篇关于如何设置AutoPostBack = false?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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