Wednesday

how to show hide div in asp.net

1.add this javascript function:


<script type="text/javascript">
function showHideExcel(){
thisElement=document.getElementById('overlayExcel')
if (!thisElement) return;
if(thisElement.style.visibility == "visible"){
thisElement.style.visibility = "hidden";
}else {
thisElement.style.visibility = "visible";
}
}
</script>



2.add this div to asp.net code


<div id="overlayExcel" name="overlayExcel" style="visibility:hidden;position:absolute; top: 120px; left: 900px;background-color:white;display:block;">
<div style="padding: 3px; background-color: #CCCCCC; border: 1px solid #666666;">
<table border="0" border="0" cellspacing="0" cellpadding="0" >
<tr><td height="30">Start Date:&nbsp;</td> <td><asp:TextBox ID="txtExcelStartDate" runat="server" /></td></tr>
<tr><td height="30">End Date:&nbsp;</td> <td><asp:TextBox ID="txtExcelEndDate" runat="server" /><br></td></tr>
<tr><td height="30" colspan="2"><asp:Button ID="btnExcelMe" runat="server" Text="Open Excel Report" OnClick="OpenExcelReport" />
<input type=button value="Cancel" onclick="showHideExcel();"></td>
</tr>
</table>
</div>
</div>



that's it.
more...

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...