ASP按钮无法在Jquery对话框上工作 [英] ASP button not working on Jquery Dialog Box

查看:64
本文介绍了ASP按钮无法在Jquery对话框上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我创建了一个jquery对话框,我从后面的代码调用



< pre lang =cs> sb.Append( $(function(){);
sb.Append( var dlg = jQuery('#Update')。dialog({);
sb.Append( width:400,height:300,modal:true);
sb.Append( }););
sb.Append( dlg.parent()。appendTo(jQuery('form:fist')););
sb.Append( }););
Page.ClientScript.RegisterStartupScript( typeof (页面), dgUpdate,sb.ToString(), true );





当在我的页面中打开时,对话框上具有代码隐藏脚本的按钮不起作用。我在网上看到了一些文章并试图遵循它但没有运气,非常需要任何帮助。



谢谢,

解决方案

(function(){);
sb.Append( var dlg = jQuery('#Update')。dialog({);
sb.Append( width:400,height:300,modal:true);
sb.Append( }););
sb.Append( dlg.parent()。appendTo(jQuery('form:fist')););
sb.Append( < span class =code-string>}););
Page.ClientScript.RegisterStartupScript( typeof (Page), dgUpdate,sb.ToString(), true );





这在我的页面中打开了对话框上有一个代码隐藏脚本的按钮不起作用。我在网上看到了一些文章并试图遵循它但没有运气,非常需要任何帮助。



谢谢,


< blockquote>我在使用JQuery对话框开发时也遇到了同样的问题。

我做的是

首先我提到了客户端ID为按钮的按钮页面,

然后我在客户端点击此按钮使用Jquery ajax回调来执行服务器操作。

 


('#<% = btnClose.ClientID %> ')。 button()。click(function(){
// ajax call back here
});



通过这样做你可以看到按钮的样式将自动更改(取决于您的CSS)

或者在对话框外放置另一个按钮,然后从模式对话框按钮客户端单击调用按钮单击or__dopostback。(不是righ实践)

根据我的经验,你只能用按钮放置Jquery对话框进行客户端操作


Hi,

I created a jquery dialog box which I call from code behind

sb.Append("$(function() { ");
            sb.Append(" var dlg = jQuery('#Update').dialog({");
            sb.Append("    width: 400,height: 300, modal:true");
            sb.Append(" });");
            sb.Append("dlg.parent().appendTo(jQuery('form:fist'));");
            sb.Append("});");
            Page.ClientScript.RegisterStartupScript(typeof(Page), "dgUpdate", sb.ToString(), true);



When this opens up in my page the button on the dialog box that has a code behind script does not work. I saw some articles in the web and tried to follow it but with no luck, any help is greatly needed.

Thanks,

解决方案

(function() { "); sb.Append(" var dlg = jQuery('#Update').dialog({"); sb.Append(" width: 400,height: 300, modal:true"); sb.Append(" });"); sb.Append("dlg.parent().appendTo(jQuery('form:fist'));"); sb.Append("});"); Page.ClientScript.RegisterStartupScript(typeof(Page), "dgUpdate", sb.ToString(), true);



When this opens up in my page the button on the dialog box that has a code behind script does not work. I saw some articles in the web and tried to follow it but with no luck, any help is greatly needed.

Thanks,


I also encountered the same issue while developing using JQuery dialog.
what i done is
First i mentioned the button with client id as button in a script tag in the page ,
then i used Jquery ajax call back in client click of this button to do the server operations.


('#<%=btnClose.ClientID%>').button().click(function () { //Do ajax call back here });


by doing this you can see that the style of button will automatically change(depends on your css)
OR else place another button outside the dialog and then invoke the button click or__dopostback from the modal dialog button client click.(not a right practice)
As per my experience you can only do client operations with buttons placed Jquery dialog


这篇关于ASP按钮无法在Jquery对话框上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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