How do I get a date from an object and display it on a page as text?

  • Thread starter Thread starter winkimjr2
  • Start date Start date
W

winkimjr2

Guest
I have an object that contains a date from database table.

I would like to use the date from the object to add the following warning message to a page Date cannot be before 12/15/2018

Here is the object that have date 12/15/2018

DateTime MyMeetingEarliestDate = HY.Common.HYConfigurationHelper.GetDateFromHYConfiguration("MeetingEarliestDate");


Right now I have manually put the warning message manually on MeetingTrackingFilter.aspx page.

<telerik:RadAjaxPanel ID="FilterElementsRAP" runat="server">
<div style="padding: 2px;">
<div style="float: left; width: 20px;">
<asp:CheckBox ID="MeetingDateChk" runat="server" ValidationGroup="FilterGroup" Checked="false" AutoPostBack="true" OnCheckedChanged="MeetingDateChk_CheckedChanged" />
</div>
<div style="float: left; width: 220px;">
<asp:Label ID="MeetingDateLabel" runat="server" AssociatedControlID="MeetingDateChk" Text="Event Date"></asp:Label>
</div>
<div style="float: left; width: 120px;">
<asp:DropDownList ID="MeetingDateDDL" runat="server" Width="100px" AutoPostBack="true" OnSelectedIndexChanged="MeetingDateDDL_SelectedIndexChanged">
<asp:ListItem Text="Equals" Value="Equals" Selected="False"></asp:ListItem>
<asp:ListItem Text="Between" Value="Between" Selected="False"></asp:ListItem>
</asp:DropDownList>
</div>
<div style="float: left; width: 375px;">
<span style="display: inline-block !important;">
<telerik:RadDatePicker runat="server" RenderMode="Lightweight" ID="MeetingDateRDP1" AutoPostBack="True" OnSelectedDateChanged="MeetingDateRDP1_SelectedDateChanged">
<Calendar runat="server" ShowRowHeaders="false"></Calendar>
</telerik:RadDatePicker>
</span>
<span style="display: inline-block !important;">
<asp:Label ID="MeetingDateBetweenLabel" runat="server">&nbsp;And&nbsp;</asp:Label></span>
<span style="display: inline-block !important;">
<telerik:RadDatePicker runat="server" RenderMode="Lightweight" ID="MeetingDateRDP2" AutoPostBack="True" OnSelectedDateChanged="MeetingDateRDP2_SelectedDateChanged">
<Calendar runat="server" ShowRowHeaders="false"></Calendar>
</telerik:RadDatePicker>
</span>
<span style="font-size: small">Date cannot be before 12/15/2018</span>
</div>
</div>
</telerik:RadAjaxPanel>


Please help.

Continue reading...
 
Back
Top