Click here to Skip to main content
16,018,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a webpage where i am using asp timer with its tick event along with modal popup for some information to display on page load of a page . now my problem is when the page gets loaded the timer tick event is called and pop up message is displayed from ajax modal pop up extender .but when i click cancel button of popup the popup reappears without getting closed. is this beacuase of timer tick or something else pls help me out with this
Posted
Comments
Tejas Vaishnav 17-Jan-14 4:41am    
on which condition you need to show your popup and on which basis you need to disable your popup?
can you please explain this.. and also provide your bit of code to check it out the issue..
Mike Meinz 17-Jan-14 6:38am    
In order to provide meaningful help, we have to see your source code.
ank170989 17-Jan-14 6:59am    
Here is my code :
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div style="position:absolute; top: 266px; left: 293px;">
<asp:panel class="popupConfirmation" id="DivConfirmation5"
runat="server">
<div class="popup_Container">
<div class="popup_Titlebar" id="Div14">
<div class="TitlebarLeft">
Message</div>
<div class="TitlebarRight" önclick="$get('ButtonDeleteCancel').click();">
</div>
</div>
<div class="popup_Body">
<p>
<asp:Label ID ="lblrecharge" runat="server">      <%--<asp:HyperLink ID="hyplogin" runat="server" NavigateUrl="~/RechargeOption.aspx">RECHARGE NOW</p>--%>
</div>
<div class="popup_Buttons">
<%-- <asp:Button ID="RechargeNow" runat="server" OnClick="RechrgeNowC()" Text="Recharge Now" />--%>
<input id="RechargeNow" type="button" value="Recharge Now" style="display:none;" />
<asp:Button ID="re" runat="server" PostBackUrl="~/RechargeOption.aspx" Text="Recharge Now" Height="30" />    
<input
id="NotNow" type="button" value="Not Now" önclick="return NotNow_onclick()" style="height:30px;" /></div>
</div>

<%-- --%>
<asp:ScriptManager ID="sc" runat="server">
<cc1:ModalPopupExtender ID="mpe5" runat="server"
TargetControlID="Button3"
PopupControlID="DivConfirmation5"
BackgroundCssClass="ModalPopupBG"
DropShadow="true"
OkControlID="RechargeNow"

CancelControlID="NotNow"
PopupDragHandleControlID="Panel3" >
<input
id="Button3" runat="server" type="button" style="display:none;" />

<asp:Button ID="Button2" runat="server" Text="Button" Visible="false" />
</div>


<asp:Timer ID="tm" runat="server" Enabled="true" Interval="1000" OnDisposed="Timer_Disposed" OnTick="Timer_Tick" >

<asp:UpdatePanel ID="up" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm" EventName="Tick" /></Triggers>
<contenttemplate>
<div style="position:absolute; top: 240px; left: 470px; height: 50px; width: 320px;">


<asp:Label ID="lbtime" runat="server" Font-Bold="true" ForeColor="Black" >
<br />
<asp:Label ID="lbtime0" runat="server" Font-Bold="true" ForeColor="Black" >


</div>




<div style="position:absolute; top: 310px; left: 440px; width:420px; height: 400px; "
id="pic1" visible="true"
runat="server"></div>





when i click not now button the modal popup reappears .here you can see i am running a lebelled asp timer

code behind is as follows


protected void Page_Load(object sender, EventArgs e)
{
try
{

lblrecharge.Text = "HELLO " + Request.Cookies["USERNAME"].Value + " YOU HAVE " + Request.Cookies["pointsreq"].Value + " LESS POINTS IN YOUR ACCOUNT TO PROCEED RECHARGE YOUR ACCOUNT ";

try
{
mpe5.Show();
}
catch (Exception)
{ }

// Response.Write("<script>alert('HELLO " + Request.Cookies["USERNAME"].Value + " YOU HAVE " + Request.Cookies["pointsreq"].Value + " LESS POINTS IN YOUR ACCOUNT TO PROCEED RECHARGE YOUR ACCOUNT');</script>");
pic1.Visible = true;
tm.Enabled = true;
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900