在asp.net中没有回发的进程按钮单击事件 [英] process button click event without postback in asp.net

查看:58
本文介绍了在asp.net中没有回发的进程按钮单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



我正在使用c#在asp.net上开发一个项目,在这个我有一个按钮,当我点击这个按钮它会显示一个由gridview,文本框和一些按钮组成的面板。这是通过普通面板'的属性可见真/假。

它工作正常但是当我点击按钮它回发整个页面,一次两次是好的,但每次加载整个页面有时很烦人,



所以我只想知道有什么方法可以解决这个问题,即没有回发我可以点击按钮点击事件。



i试过UseSubmitBehavior = false但是没用..



我希望你能理解我的问题,请帮我摆脱这个问题。



谢谢。

Hello friends,

I was developing a project in asp.net with c#, in this i''ve a button, when i click this button it will display a panel which consists of a gridview, textbox and some buttons. it is done by normal panel''s property visible true/false.
It works fine but when i click the button it postback the entire page, one time two time is ok but every time it loads the entire page is sometimes irritates,

so i just want to know that is there any way to overcome this problem, that is without postback can i fire the button click event.

i tried UseSubmitBehavior=false but it was of no use..

I hope you understood my problem, Please help me to get rid of this problem.

Thank you.

推荐答案

听起来像是在使用AJAX可能会帮助你。看看UpdatePanel并使用它。它只会在回发时重新渲染更新面板。



在这里你去:

UpdatePanel控件 [ ^ ]

UpdatePanel类 [ ^ ]



Nutshell:您需要将内容放在Udpate面板中以启用部分渲染。
Sounds like using AJAX might help you out. Have a look at UpdatePanel and use it. It would re-render only the update panel on postback.

Here you go:
UpdatePanel control[^]
UpdatePanel Class[^]

Nutshell: You need to put your content in an Udpate Panel to enable partial rendering.


使用更新面板Ajax和更新模式=条件
Use update panel Ajax and update mode= conditional


这篇关于在asp.net中没有回发的进程按钮单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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