참조 Url :
http://blog.naver.com/q1q3q5?Redirect=Log&logNo=10104690457
.UnderLay
{
display:none;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background-color:#000;
-moz-opacity:0.5;
opacity:.50;
filter:alpha(opacity=50);
}
Div를 하나 만들어 적용하면 된다.
<div class="UnderLay" runat="server" id="UnderBack"></div>
위와 같이 만들어 .cs 파일에서 안래와 같이 이용한다.
UnderBack.Style[HtmlTextWriterStyle.Display] = "Block";
UnderBack.Style[HtmlTextWriterStyle.Display] = "none";
onclick 이벤트에 닫는 기능을 넣어준다.
<div onclick="layerClose()"></div>
<script type="text/javascript">
function layerClose() {
document.getElementById('<%=layerPop.ClientID%>').style.display = 'none';
}
</script>