jQuery的日期选择在asp.net [英] jquery datepicker in asp.net
本文介绍了jQuery的日期选择在asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么毛病低于code,它扔我一个错误
编译器错误信息:CS1002:;预计
$(文件)。就绪(函数(){ $('<%= StartDate.UniqueID%GT;')日期选择器({showOn:按钮,
按钮画面:../images/Calendar.png',
buttonImageOnly:真实,ONSELECT:
功能(){},
的OnClose:函数(){$(本)。重点(); }
});
});<标签=SD>起始日期:LT; /标签>
< ASP:文本框ID =起始日期=服务器>< / ASP:文本框>
错误
Controls集合不能修改,因为该控件包含code块(即<%...%GT)。
解决方案
我居然也得到了错误的原因:
Microsoft JScript运行错误:对象不支持此属性或方法
因为我是有冲突的.js参考,并出现了两种不同的.js文件的页面上。
希望这可以帮助其他。
whats wrong with the below code, its throwing me an error of Compiler Error Message: CS1002: ; expected
$(document).ready(function() {
$('<%=StartDate.UniqueID%>').datepicker({ showOn: 'button',
buttonImage: '../images/Calendar.png',
buttonImageOnly: true, onSelect:
function() { },
onClose: function() { $(this).focus(); }
});
});
<label for="sd">StartDate:</label>
<asp:TextBox ID="StartDate" runat="server"></asp:TextBox>
error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
解决方案
the reason i was getting the error:
"Microsoft JScript runtime error: Object doesn't support this property or method"
because i was having conflict .js reference and there were two different set of .js on the page
hope this helps other.
这篇关于jQuery的日期选择在asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文