Jquery datepicker文本框服务器控件无法在asp.net向导控件中工作 [英] Jquery datepicker textbox server control not working in asp.net wizard control
本文介绍了Jquery datepicker文本框服务器控件无法在asp.net向导控件中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我想在点击asp文本框时使用日历。但是文本框是asp向导步骤,所以jquery不能在asp:wizardstep中工作。
请帮助...
代码是 -
Hello,
I want to use calendar when click on asp text box. But text box is in asp wizard step, so jquery is not working in asp:wizardstep.
Please help...
Code is-
<html lang="en">
<head>
<title>jQuery UI Datepicker - Default functionality</title>
</head>
<body>
<form runat="server">
<asp:ScriptManager ID="ScriptManager2" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
});
</script>
<asp:Wizard ID="Wizard1" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
<asp:Panel ID="pnl" runat="server">
<asp:TextBox runat="server" type="text" ReadOnly="true" ID="datepicker"></asp:TextBox>
</asp:Panel>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
如果删除asp:向导&安培; asp:wizardstepstep它运行正常,但是使用向导它不起作用。
谢谢。
If you remove asp:wizard & asp:wizardstepstep it is working fine but with wizard it is not working.
Thanks.
推荐答案
( function (){
( #datepicker )。datepicker();
});
< / script >
< asp:向导 ID = Wizard1 runat = 服务器 >
< WizardSteps >
< asp:WizardStep ID = WizardStep1 runat = 服务器 标题 = 步骤1 >
< asp:Panel ID = pnl runat = server >
< asp:TextBox runat = server type = < span class =code-keyword> text ReadOnly = true ID = datepicker > < / asp:TextBox >
< / asp:Panel >
< / asp:WizardStep >
< < span class =code-leadattribute> / WizardSteps >
< / asp:向导 >
< ; / ContentTemplate >
< / asp:UpdatePanel >
< / form >
< / body >
< span class =code-keyword>< / htm l >
("#datepicker").datepicker(); }); </script> <asp:Wizard ID="Wizard1" runat="server"> <WizardSteps> <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1"> <asp:Panel ID="pnl" runat="server"> <asp:TextBox runat="server" type="text" ReadOnly="true" ID="datepicker"></asp:TextBox> </asp:Panel> </asp:WizardStep> </WizardSteps> </asp:Wizard> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html>
如果删除asp:向导&安培; asp:wizardstepstep工作正常,但是向导无法正常工作。
谢谢。
If you remove asp:wizard & asp:wizardstepstep it is working fine but with wizard it is not working.
Thanks.
使用 ClientID 查找文本框:
这里替换此代码:
Use ClientID to find text box :
here replace this code :
这篇关于Jquery datepicker文本框服务器控件无法在asp.net向导控件中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文