单击按钮时按钮刷新问题 [英] button refresh issue when i click button

查看:75
本文介绍了单击按钮时按钮刷新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击按钮时页面完全刷新我需要不需要刷新请发布如何解决问题

解决方案





你可以参考下面的链接来了解AJAX和更新面板。



AJAX for Beginners(第1部分) - 了解ASP.NET AJAX服务器控件 [ ^ ]

Ajax初学者教程 [ ^ ]

UpdatePanel控件简介 [ ^ ]

UpdatePanel Control Tutorials [ ^ ]

UpdatePanel控件 [ ^ ]

AJAX教程 [ ^ ]



希望它有所帮助。


使用更新面板..



http://www.aspdotnet-suresh.com/2012/05/ajax-updapanel-contro l-with-triggers.html [ ^ ]


如果您只想让按钮执行某些Javascript功能而不是提交整个表单,请使用以下任一项:



 <  输入    id   =  myBtn1    class   =  txtUpdateContract    type   = 按钮    onclick   =  doFunction();     = 点击    /  >  



或:

 <   asp:button     id   =  myBtn2    runat   =  server    onclientclick   =  doFunction();返回false;    text   = 点击    usesubmitbehavior   =  false    /  >  


when i click the button the page is totally refreshed i need don''t require that refresh please post how to resolve the problem

解决方案

Hi,

you can refer below links for understanding AJAX and update panel.

AJAX for Beginners (Part 1) - Understanding ASP.NET AJAX Server Controls[^]
Ajax Beginners Tutorial[^]
Introduction to the UpdatePanel Control[^]
UpdatePanel Control Tutorials[^]
UpdatePanel control[^]
AJAX Tutorial[^]

hope it helps.


USE UPDATE PANEL ..

http://www.aspdotnet-suresh.com/2012/05/ajax-updapanel-control-with-triggers.html[^]


If you just want the button to perform some Javascript function rather than submitting the entire form, use either:

<input id="myBtn1" class="txtUpdateContract" type="button" onclick="doFunction();" value="Click" />


or:

<asp:button id="myBtn2" runat="server" onclientclick="doFunction();return false;" text="Click" usesubmitbehavior="false" />


这篇关于单击按钮时按钮刷新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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