如何在子页面中访问母版页表单标签ID [英] How to access master page form tag id in child page

查看:63
本文介绍了如何在子页面中访问母版页表单标签ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友

我有一个母版页,其中有1个表单标签

hi friends

i have one master page in which i have taken 1 form tag
like

<form id="form1" runat="server"> </form>



而且我想使用仅适用于表单标签的jquery验证引擎
因此,我希望此ID在子页面中可用,以便我可以使用它.



and i want to use validation engine of jquery which is only applicable on form tag
So i want this id to be available in my child page so that i can use it.
like

$(document).ready(function() {
           $("#form1").validationEngine('attach');
       });


所以请帮我解决这个问题...
在此先感谢


so please help me to resolve this issue...
thanks in advance

推荐答案

(文档).ready(函数(){
(document).ready(function() {


(" span>).validationEngine(' attach'); });
("#form1").validationEngine('attach'); });


所以请帮我解决这个问题...
在此先感谢


so please help me to resolve this issue...
thanks in advance


大家好,我也面临着同样的问题,终于得到了解决方案.
只需复制以下代码并将其粘贴到子页面的标题内容中即可.

Hi guys I too was facing the same problem, finally i got the solution.
Just copy the below code and paste it in the child page''s header content.

<script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery('#' + '<%=Master.FindControl("form1").ClientID %>').validationEngine();
    });
</script>


这篇关于如何在子页面中访问母版页表单标签ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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