Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
yvette
Yak Posting Veteran
74 Posts |
Posted - 2010-09-14 : 22:55:03
|
| Hi, i develop my final year project with asp.net c# and sql server 2008.HTML code<asp:TextBox ID="txtDOB" runat="server" Width="57px"></asp:TextBox> <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" onselectionchanged="Calendar1_SelectionChanged" SelectedDate="09/15/2010 10:42:26" Width="200px"> <SelectedDayStyle BackColor="#FF6600" Font-Bold="True" ForeColor="#66FFFF" /> <SelectorStyle BackColor="#9966FF" ForeColor="Red" /> <WeekendDayStyle BackColor="#FFFFCC" /> <TodayDayStyle BackColor="Red" ForeColor="#6600FF" /> <OtherMonthDayStyle ForeColor="#808080" /> <DayStyle ForeColor="#FF5050" /> <NextPrevStyle VerticalAlign="Bottom" /> <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" /> <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" /> </asp:Calendar>Code behind protected void Calendar1_SelectionChanged(object sender, EventArgs e) { txtDOB.Text = Calendar1.SelectedDate.Date.ToString(); } Above is mt code.it works but how if i want to hide the calendar with a button and i want to change the format of the date become date(not date time) and dd-mm-yyyy???in sql, i the date type as datetime...izzit possible???Thanks... |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2010-09-14 : 23:32:40
|
| Please do not cross post:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=150150 |
 |
|
|
|
|
|