control Calendar's visibility

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

I want to click on the body and make the startCalendar.Visible =
"false"...
but it's not working...
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void startButton_Click(object sender, ImageClickEventArgs
e)
{
startCalendar.Visible = true;
}

}

something like...
protected void calendarClear(object sender, EventArgs e)
{
startCalendar.Visible = false;
}

and place it in on the <body onclick="calendarClear">
..</body>

thanks
 
VJ,
Let me get this straight you want to click any where on the page and make
the calendar visible. Sorry, the body element does not direcly support
aspnet click events. You'd have to do it with java script. An alternative
would be to make the startbutton toggle the visibility of the calendar.
Note: I'm not c# wizzard. startcalenar.visible = not startcalendar.visible
protected void startButton_Click(object sender, ImageClickEventArgs e)
{
startCalendar.Visible = ! startcalendar.visible
}

Good Luck
DWS
 
Back
Top