Yes No Confirmation Dialog using Modal Popup in ASP.Net

on May 17, 2013 12:26 AM

1-I want to "when I was click the Show button show in label but but popup will not close" ;

2-When popup open all textboxt empty

3-when popup close ;closeButton will run like Response.Redirect("abc.aspx")


This is my code;

<style type="text/css">
#overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
-khtml-opacity: 0.7;
opacity: 0.7;
z-index: 100;
display: none;
.content a{
text-decoration: none;
width: 100%;
margin: 0 auto;
display: none;
position: fixed;
z-index: 101;
min-width: 600px;
width: 600px;
min-height: 150px;
margin: 100px auto;
background: #f3f3f3;
position: relative;
z-index: 103;
padding: 10px;
border-radius: 5px;
box-shadow: 0 2px 5px #000;
.content p{
clear: both;
color: #555555;
text-align: justify;
.content p a{
color: #d91900;
font-weight: bold;
.content .x{
float: right;
height: 35px;
left: 22px;
position: relative;
top: -25px;
width: 34px;
.content .x:hover{
cursor: pointer;
<script type="text/javascript" src="jquery-1.8.2.js"></script>
<script type='text/javascript'>
$(function () {
var overlay = $('<div id="overlay"></div>');
//$('.close').click(function () {
// $('.popup').hide();
// overlay.appendTo(document.body).remove();
// return false;

$('.x').click(function () {
return false;

$('.click').click(function () {;
return false;
<form runat="server">
<div class='popup'>
<div class='content'>
<img src="x.png" alt='quit' class='x' id='x' />
Please use above search option which was there in top right side to get help with many of articles.
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Button ID="btnTime" runat="server" Text="Time??" />
<br />

<asp:Label ID="labelTime" runat="server" Text="_"></asp:Label>
<a href='' class='close'>Kapat</a>

<div id='container'>
<a href='' class='click'><h2><b>Click Here to See Popup! </b></h2></a> <br/>

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on May 17, 2013 11:55 PM