简体   繁体   中英

c# to javascript for YUI calendar

I am looking to run a select statement in my C# code behind pages to select dates from a MSSQL table so that I can highlight booked dates in my YUI calendar. I have done this manually by using the following JavaScript (this highlights September 1st):

YAHOO.example.calendar.cal1.addRenderer("9/1/2012",YAHOO.example.calendar.cal1.renderCellStyleHighlight1);

Is there a way to get the dates that I have selected from the database to then be 'echoed' into JavaScript like below? I know how to do this in PHP but not in ASP.NET!

Any help would be appreciated. Thanks

您可以使用AJAX返回日期,这是一个快速教程: http : //blogs.microsoft.co.il/blogs/gilf/archive/2008/10/04/asp-net-ajax-pagemethods.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM