Click here to Skip to main content
16,004,977 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebBrowser in C# Pin
Christian Graus19-Jan-09 2:35
protectorChristian Graus19-Jan-09 2:35 
GeneralRe: WebBrowser in C# Pin
musefan19-Jan-09 2:41
musefan19-Jan-09 2:41 
GeneralRe: WebBrowser in C# Pin
Christian Graus19-Jan-09 2:55
protectorChristian Graus19-Jan-09 2:55 
AnswerRe: WebBrowser in C# Pin
Christian Graus19-Jan-09 2:33
protectorChristian Graus19-Jan-09 2:33 
QuestionActive dialog select the HTML on the subject WebBrower with C # Pin
trinm198719-Jan-09 1:30
trinm198719-Jan-09 1:30 
AnswerRe: Active dialog select the HTML on the subject WebBrower with C # Pin
SeMartens19-Jan-09 1:45
SeMartens19-Jan-09 1:45 
GeneralRe: Active dialog select the HTML on the subject WebBrower with C # Pin
trinm198719-Jan-09 1:52
trinm198719-Jan-09 1:52 
Questioncalendar control with drop down list Pin
chithra.r19-Jan-09 1:01
chithra.r19-Jan-09 1:01 
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

JokeInvalidForumException PinPopular
Giorgi Dalakishvili19-Jan-09 1:06
mentorGiorgi Dalakishvili19-Jan-09 1:06 
QuestionPopulate comboBox from Dictionary? Pin
kanchoette19-Jan-09 1:01
kanchoette19-Jan-09 1:01 
AnswerRe: Populate comboBox from Dictionary? Pin
Giorgi Dalakishvili19-Jan-09 1:04
mentorGiorgi Dalakishvili19-Jan-09 1:04 
GeneralRe: Populate comboBox from Dictionary? Pin
Luc Pattyn19-Jan-09 1:04
sitebuilderLuc Pattyn19-Jan-09 1:04 
QuestionString for XPath Pin
satsumatable19-Jan-09 0:47
satsumatable19-Jan-09 0:47 
AnswerRe: String for XPath Pin
SeMartens19-Jan-09 1:14
SeMartens19-Jan-09 1:14 
AnswerRe: String for XPath Pin
#realJSOP19-Jan-09 1:29
professional#realJSOP19-Jan-09 1:29 
Questionwindows communication foundation Pin
AmbitiousBeginner19-Jan-09 0:36
AmbitiousBeginner19-Jan-09 0:36 
AnswerRe: windows communication foundation Pin
SeMartens19-Jan-09 1:21
SeMartens19-Jan-09 1:21 
Questionto retrieve the word document from sqlserver Pin
gopal_nivas8419-Jan-09 0:31
gopal_nivas8419-Jan-09 0:31 
AnswerRe: to retrieve the word document from sqlserver Pin
Giorgi Dalakishvili19-Jan-09 0:41
mentorGiorgi Dalakishvili19-Jan-09 0:41 
GeneralRe: to retrieve the word document from sqlserver Pin
gopal_nivas8419-Jan-09 0:48
gopal_nivas8419-Jan-09 0:48 
GeneralRe: to retrieve the word document from sqlserver Pin
Giorgi Dalakishvili19-Jan-09 0:50
mentorGiorgi Dalakishvili19-Jan-09 0:50 
QuestionCould you please tell me the advantage of using the interface to code? Pin
mctramp16819-Jan-09 0:16
mctramp16819-Jan-09 0:16 
AnswerRe: Could you please tell me the advantage of using the interface to code? Pin
SeMartens19-Jan-09 0:23
SeMartens19-Jan-09 0:23 
AnswerRe: Could you please tell me the advantage of using the interface to code? Pin
DaveyM6919-Jan-09 1:14
professionalDaveyM6919-Jan-09 1:14 
AnswerRe: Could you please tell me the advantage of using the interface to code? Pin
Alan Balkany19-Jan-09 3:38
Alan Balkany19-Jan-09 3:38 

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.