control Calendar's visibility

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top