Click here to Skip to main content
15,911,139 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: [newbie] calendar control Pin
ToddHileHoffer19-Jan-09 8:18
ToddHileHoffer19-Jan-09 8:18 
QuestionCross tab Crystal Report in Visual studio Pin
Blumen19-Jan-09 2:57
Blumen19-Jan-09 2:57 
QuestionHow to add Print functionality to crystal report Pin
Rameez Raja19-Jan-09 2:05
Rameez Raja19-Jan-09 2:05 
QuestionHow to make a call to web services Pin
jaraldumary19-Jan-09 1:33
jaraldumary19-Jan-09 1:33 
AnswerRe: How to make a call to web services Pin
SeMartens19-Jan-09 1:57
SeMartens19-Jan-09 1:57 
AnswerRe: How to make a call to web services Pin
Reza Raad19-Jan-09 2:26
Reza Raad19-Jan-09 2:26 
AnswerRe: How to make a call to web services Pin
Abhijit Jana19-Jan-09 4:04
professionalAbhijit Jana19-Jan-09 4:04 
Questioncalendar with drop down list Pin
chithra.r19-Jan-09 1:16
chithra.r19-Jan-09 1:16 
Hi iam trying to implement a calendar control.i want to design like this.

i have 3 drop down list(for day,month,year) at the top followed by a calendar control.

and 3 link buttons(prev,today,next) at the bottom.

if i select the particular day,month and year the calendar has to display accordingly,the same
should happen with the link buttons also.

can anyone tell me how to do this.iam not using any ajax controls.iam using
asp .net calendar control.

the code goes like this....

cal.aspx...



<table id="table1" width="100%">

<tr></tr>

<tr>

<td align="center">

<asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True">

<asp:ListItem Value="1"></asp:ListItem>

<asp:ListItem Value="2"></asp:ListItem>

<asp:ListItem Value="3"></asp:ListItem>

<asp:ListItem Value="4"></asp:ListItem>

<asp:ListItem Value="5"></asp:ListItem>

<asp:ListItem Value="6"></asp:ListItem>

<asp:ListItem Value="7"></asp:ListItem>

<asp:ListItem Value="8"></asp:ListItem>

<asp:ListItem Value="9"></asp:ListItem>

<asp:ListItem Value="10"></asp:ListItem>

</asp:DropDownList>

<asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True">

<asp:ListItem Value="January"></asp:ListItem>

<asp:ListItem Value="Febraury"></asp:ListItem>

<asp:ListItem Value="March"></asp:ListItem>

<asp:ListItem Value="April"></asp:ListItem>

<asp:ListItem Value="May"></asp:ListItem>

<asp:ListItem Value="June"></asp:ListItem>

<asp:ListItem Value="July"></asp:ListItem>

<asp:ListItem Value="August"></asp:ListItem>

<asp:ListItem Value="September"></asp:ListItem>

<asp:ListItem Value="October"></asp:ListItem>

<asp:ListItem Value="November"></asp:ListItem>

<asp:ListItem Value="December"></asp:ListItem>

</asp:DropDownList>

<asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True">

<asp:ListItem Value="2000"></asp:ListItem>

<asp:ListItem Value="2001"></asp:ListItem>

<asp:ListItem Value="2002"></asp:ListItem>

<asp:ListItem Value="2003"></asp:ListItem>

<asp:ListItem Value="2004"></asp:ListItem>

<asp:ListItem Value="2005"></asp:ListItem>

<asp:ListItem Value="2006"></asp:ListItem>

<asp:ListItem Value="2007"></asp:ListItem>

<asp:ListItem Value="2008"></asp:ListItem>

<asp:ListItem Value="2009"></asp:ListItem>

</asp:DropDownList>

</td>

</tr>

<tr>

<td>

<table id = "table2" width="100%">

<tr></tr>

<tr>

<td align="center">

<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px" OnSelectionChanged="Calendar1_SelectionChanged">

<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />

<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />

<SelectorStyle BackColor="#CCCCCC" />

<WeekendDayStyle BackColor="#FFFFCC" />

<OtherMonthDayStyle ForeColor="#808080" />

<NextPrevStyle VerticalAlign="Bottom" />

<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />

<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />

</asp:Calendar>

</td>

</tr>

</table>

<table id = "table3" width="100%">

<tr></tr>

<tr>

<td align="center">

<asp:LinkButton ID="lnkPrev" runat="server" OnClick="lnkPrev_Click">&lt Prev</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="lnkToday" runat="server" OnClick="lnkToday_Click">Today</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="lnkNext" runat="server" OnClick="lnkNext_Click">Next &gt</asp:LinkButton>

<%--<asp:Label ID="lblshow" runat="server" Text="Label"></asp:Label>--%>
</td>

</tr>

</table>

</td>

</tr>

</table>



cal.aspx.cs file...



protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{

cboDay.SelectedValue = Calendar1.SelectedDate.Date.ToString();

cboMonth.SelectedValue = Calendar1.SelectedDate.Month.ToString();

cboYear.SelectedValue = Calendar1.SelectedDate.Year.ToString();

}

and i want the calendar to change according to the selected date,month,year in the drop down.plz help me out...

pintoo

AnswerRe: calendar with drop down list Pin
Christian Graus19-Jan-09 2:02
protectorChristian Graus19-Jan-09 2:02 
QuestionHELP! Problem in adding web part to page layout Pin
Amarnath J19-Jan-09 1:13
Amarnath J19-Jan-09 1:13 
QuestionConditional Formatting in a CSS Pin
DoxMan19-Jan-09 1:10
DoxMan19-Jan-09 1:10 
AnswerRe: Conditional Formatting in a CSS Pin
Christian Graus19-Jan-09 2:03
protectorChristian Graus19-Jan-09 2:03 
GeneralRe: Conditional Formatting in a CSS Pin
DoxMan19-Jan-09 2:18
DoxMan19-Jan-09 2:18 
GeneralRe: Conditional Formatting in a CSS Pin
Paddy Boyd19-Jan-09 2:35
Paddy Boyd19-Jan-09 2:35 
Questionsend report via FAX Pin
bhaumikdv19-Jan-09 0:58
bhaumikdv19-Jan-09 0:58 
AnswerRe: send report via FAX Pin
Christian Graus19-Jan-09 2:03
protectorChristian Graus19-Jan-09 2:03 
Questionhai Pin
naagrjuna19-Jan-09 0:32
naagrjuna19-Jan-09 0:32 
AnswerRe: hai Pin
N a v a n e e t h19-Jan-09 1:02
N a v a n e e t h19-Jan-09 1:02 
AnswerRe: hai Pin
Christian Graus19-Jan-09 2:04
protectorChristian Graus19-Jan-09 2:04 
QuestionProblem using http handler Pin
CrazyCoder2618-Jan-09 23:52
CrazyCoder2618-Jan-09 23:52 
AnswerRe: Problem using http handler Pin
N a v a n e e t h19-Jan-09 0:59
N a v a n e e t h19-Jan-09 0:59 
QuestionCustom Sorting for GridView Pin
sandhya1418-Jan-09 23:50
sandhya1418-Jan-09 23:50 
AnswerRe: Custom Sorting for GridView Pin
Herman<T>.Instance19-Jan-09 3:15
Herman<T>.Instance19-Jan-09 3:15 
GeneralRe: Custom Sorting for GridView Pin
sandhya1419-Jan-09 17:49
sandhya1419-Jan-09 17:49 
GeneralRe: Custom Sorting for GridView Pin
Herman<T>.Instance19-Jan-09 20:33
Herman<T>.Instance19-Jan-09 20:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.