如何在ASP.NET母版页中使用datepicker函数 [英] How to use datepicker function in ASP.NET masterpage
问题描述
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript">
$(function () {
debugger;
$("#<%= txtCashAmt.ClientID %>").datepicker({
changeMonth: true,
changeYear: true,
yearRange: '1970:2012'
});
});
</script>
<style type="text/css">
.ui-datepicker { font-size:8pt !important}
</style>
<div>
<asp:TextBox ID="txtCashAmt" runat="server" CssClass="date"></asp:TextBox>
</div>
我尝试过:
我想添加这个我的webform中的datepicker函数有masterpage.But javascript函数不能使用这个文本框。虽然它与< html>一起工作正常标签,但我如何使用asp.net表格与masterpage.Please帮助!
What I have tried:
I want to add this datepicker function in my webform which has masterpage.But the javascript function is not working with this textbox.though it works fine with <html> tag but how i can use it with asp.net form with masterpage.Please Help!
推荐答案
( function (){
调试器;
( #<%= txtCashAmt.ClientID%>)。datepicker({
changeMonth: true ,
changeYear: true ,
yearRange:' 1970:2012'
});
});
< / script >
< style type = text / css >
。 ui-datepicker { font-size : 8pt !important }
< / style>
("#<%= txtCashAmt.ClientID %>").datepicker({ changeMonth: true, changeYear: true, yearRange: '1970:2012' }); }); </script> <style type="text/css"> .ui-datepicker { font-size:8pt !important} </style>
<div>
<asp:TextBox ID="txtCashAmt" runat="server" CssClass="date"></asp:TextBox>
</div>
我尝试过:
我想添加这个我的webform中的datepicker函数有masterpage.But javascript函数不能使用这个文本框。虽然它与< html>一起工作正常标签,但我如何使用asp.net表格与masterpage.Please帮助!
What I have tried:
I want to add this datepicker function in my webform which has masterpage.But the javascript function is not working with this textbox.though it works fine with <html> tag but how i can use it with asp.net form with masterpage.Please Help!
在客户端(标记视图):,它重新要求重新绘制每次在Prerendered阶段后,(简单在活动表格上做,而不是主表格)
功能页面负载()
{
in client side (markup view): , it rerquires to repainted each time after Prerendered stage, (simply do it on active form , not master form )
function pageLoad()
{
>
这篇关于如何在ASP.NET母版页中使用datepicker函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!