选择复选框值 [英] selecting checkboxes values
问题描述
我有一个asp:Calendar控件,并在日历显示时动态地显示每个日期,我在其旁边添加了一个复选框.
I've a asp:Calendar control and to each date, dynamically when the calendar renders i'm adding a checkbox next to it.
根据我需要,用户可以选中和取消选中该复选框.将检查的日期发送给我数据库.
The user can check and uncheck the checkbox , based on that i need to send the checked dates to my database.
现在,我的问题是我不知道该用什么来收集日期列表以将其发送到数据库,请问这方面我可以帮忙
Now, my problem is that i have no idea what to use to collect the dates list to send it to database, can you guys please help me in this aspect
仅供参考,我提供的是日历Dayrender事件中使用的代码
FYI, i am giving the code which i have used in the Calendar Dayrender Event
受保护的空白LunchCalendar_DayRender(对象发送者,DayRenderEventArgs e)
{
e.Cell.Text =";
CheckBox c = new CheckBox();
e.Cell.Controls.Add(c);
c.Text = e.Day.DayNumberText;
如果(e.Day.IsOtherMonth)
{
e.Cell.Text = null;
}
如果(e.Day.IsWeekend)
{
c.Checked = true;
c.Enabled = false;
}
}
protected void LunchCalendar_DayRender(object sender, DayRenderEventArgs e)
{
e.Cell.Text = "";
CheckBox c = new CheckBox();
e.Cell.Controls.Add(c);
c.Text = e.Day.DayNumberText;
if (e.Day.IsOtherMonth)
{
e.Cell.Text = null;
}
if (e.Day.IsWeekend)
{
c.Checked = true;
c.Enabled = false;
}
}
我们将不胜感激.
推荐答案
谢谢您的发帖!  ;我建议将您的问题发布到MS论坛之一中
Thank you for your post! I would suggest posting your question in one of the MS Forum
这篇关于选择复选框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!