us this Java script Code To Show And Hid the Div:
<pre lang="xml"><script language="javascript">;
function togglediv(divid) {
if (document.getElementById(divid).style.display == 'none') {
document.getElementById(divid).style.display = 'block';
}
else {
document.getElementById(divid).style.display = 'none';
}
</script>
and this int the Html Code any where :
<div id="Calander" class="popup-body" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="width: 96%; height: 99%;">
<tr>
<td align="right" class="popup-sp-bottom" style="height: 25px;" colspan="2">
</td>
</tr>
<td style="text-align: center;">
<asp:Calendar ID="calMyCal" runat ="server" ></asp:Calendar>
</td>
</tr>
<tr>
<td align="left" style="height: 20px;" colspan="2">
<a class="popup-close" href="javascript:;" onclick="togglediv('Calander');">
Close
</a>
</td>
</tr>
</table>
</div>
in the Head u will Write This :
<pre lang="css">
.popup-body
{
width:auto;
height:auto;
display:none;
position:fixed;
z-index:999999999;
top:40%;/*----determine the top -----*/
left:30%;/*----determine the left margin-----*//*---------*/
vertical-align:middle;
border:solid 2px #006248;
}
</pre>
To Show The pop Us
Markup:
<a href="javascript:;" onclick="togglediv('Calander');">Show Calander</a>
Ibraheem Abulubbad
.Net Developer