C# 在页脚模板中填充当前日期和时间作为默认值

C# 在页脚模板中填充当前日期和时间作为默认值,c#,asp.net,C#,Asp.net,如何使用下面的默认值Now填充RadDateTimePicker: <FooterTemplate> <telerik:RadDateTimePicker Width="150px" ID="txt_QualityInspectorDateTimeFooter" runat="server" /> </FooterTemplate> 检查此链接: 我找到了正确的解决方案: GridViewRow gridStoppageFooterRow = g

如何使用下面的默认值Now填充RadDateTimePicker:

<FooterTemplate>
    <telerik:RadDateTimePicker Width="150px" ID="txt_QualityInspectorDateTimeFooter" runat="server" /> 
</FooterTemplate>
检查此链接:


我找到了正确的解决方案:

GridViewRow gridStoppageFooterRow = gvw_InspectionMainProcess.FooterRow;
RadDateTimePicker txt_LineInchargeDateTime = gridStoppageFooterRow.FindControl("txt_LineInchargeDateTimeFooter") as RadDateTimePicker;
txt_LineInchargeDateTime.SelectedDate = DateTime.Now;

显示一些代码Ganesh_Devlekar这是datetime picker的代码,我想将当前datetime设置为默认值怎么可能?你是什么意思,Aydinin先生?
GridViewRow gridStoppageFooterRow = gvw_InspectionMainProcess.FooterRow;
RadDateTimePicker txt_LineInchargeDateTime = gridStoppageFooterRow.FindControl("txt_LineInchargeDateTimeFooter") as RadDateTimePicker;
txt_LineInchargeDateTime.SelectedDate = DateTime.Now;