I have a condition in which i want to show the pop up div on page load, depending on querystring. like if query string value not null or empty then i want to show popup message else close the popup.
my Code
<head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css"
type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var hiddenControlValue = document.getElementById('<%= myHiddenField.ClientID %>').value;
if (hiddenControlValue=="true") {
$('#dialog').dialog({
modal: 'true',
title: 'title'
});
}
});
</Head>
<body>
<form>
<asp:HiddenField ID="myHiddenField" runat="server" />
<div id="dialog" title="Basic dialog" style="display:none;">
<%--<p>
This is the default dialog which is useful for displaying information. The dialog
window can be moved, resized and closed with the 'x' icon.</p>--%>
<p class="txtaligncenter"> <asp:Label ID="lblLoginMsg" CssClass="failureNotification" runat="server"></asp:Label>
<asp:Button ID="btnOk" runat="server" OnClick="btnOk_Click" Text="Ok" ClientIDMode="Static"
</div>
<form>
</body>
my c# code is
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
string isonline = Request.QueryString["Isonline"];
if (isonline != null)
{
lblLoginMsg.Text ="My message here";
myHiddenField.Value = "true";
}
}
this code work realy but problem is that there isa button btnOk in popup div, i want to some work on server side onclick this button but my event not fire
someone help me
thanks in advance