Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / October 2006

Tip: Looking for answers? Try searching our database.

possible calendar bug

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Abraham Andres Luna - 25 Oct 2006 18:00 GMT
hello everyone,

i'm having a hard time setting the selected date in a custom control. below
is the custom control code:

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace IS.WebControls
{
public class ISBaseCalendar : Control
{
Calendar cCalendar;
protected override void OnInit(EventArgs E)
{
base.OnInit(E);
this.cCalendar = new Calendar();
this.cCalendar.SelectedDate = DateTime.Now;
this.Controls.Add(cCalendar);
}
}
}

below is the page code:
<%@ Page Language="C#" %>
<html>
<head>
 <title>Test Page</title>
</head>
<body>
<form runat="server">
 <IS:ISBaseCalendar id="cDTECA" runat="server" />
</form>
</body>
</html>

when you navigate to the page, today's date is not selected. i also tried
setting the date after adding the calendar to my control:
this.cCalendar = new Calendar();
this.Controls.Add(cCalendar);
this.cCalendar.SelectedDate = DateTime.Now;

and it still doesn't work. please help me in resolving this issue. i've
tested other properties, like ShowTitle, etc. and all they all work as
expected.
Abraham Andres Luna - 26 Oct 2006 13:12 GMT
i did some testing, and the date is selected. for some reason it isn't
styled correctly. i guess having the calendar as part of a custom control
breaks the styling. please help with this bug.

| hello everyone,
|
[quoted text clipped - 41 lines]
| tested other properties, like ShowTitle, etc. and all they all work as
| expected.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.