Board index » Web Programming » control Calendar's visibility

control Calendar's visibility

Web Programming267
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



--

Sent via .NET Newsgroups

www.dotnetnewsgroups.com


-
 

Re:control Calendar's visibility

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







"VJ" wrote:



Quote
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



--

Sent via .NET Newsgroups

www.dotnetnewsgroups.com">www.dotnetnewsgroups.com



-