Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2010, 12:44 AM
Authorized User
 
Join Date: Dec 2005
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surendraparashar
Default Problem to Open popup window without page refresh

Dear Sir,

I am using .net 2.0, AJAX, C#

On
<asp:Timer control's
Tick event
I am retrieving data from database and then based on some condition, I want to open popup window.
it is working with page posback. I just want to avoid page post back.
When I am trying to set trigger like following code then popup is not opening

aspx code:-
---------------------------------------------------------
<div>
<asp:UpdatePanel ID="pnl1" runat="server" >
<ContentTemplate>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>

<asp:Timer ID="Timer1" runat="server" Interval="12000" OnTick="Timer1_Tick">
</asp:Timer>
</div>
.cs page code
------------------------------------------------------------------------------------
protected void Timer1_Tick(object sender, EventArgs e)
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["isOpen"].ToString() == "N")
{
string strWinName = dt.Rows[i]["username"].ToString();
string qryString = "?serverName=server&clientName=" + dt.Rows[i]["username"].ToString() + "&userType=server'";
Page.ClientScript.RegisterStartupScript(this.GetTy pe(), strWinName, "<script> window.open('chat/chatwindow.aspx" + qryString + ",'" + strWinName + "','" + param1 + "');</script>");
}
}
}
}
--------------------------------------------------------------------------------------
Please help / provide another technique to open popup without page refresh by using C#, .Net 2.0 and AJAX
__________________
Surendra Parashar
Gurgaon,
http://www.geocities.com/surendraparashar





Similar Threads
Thread Thread Starter Forum Replies Last Post
open popup window with text reddyshekar C# 2005 1 July 2nd, 2007 08:34 AM
JavaScript : window.open -> Popup Blocker Issue AbrarNazeer Pro JSP 0 September 2nd, 2006 05:49 AM
get popup window value without refresh qadeerahmad General .NET 6 August 4th, 2006 10:49 AM
open popup window in asp.net rajn ASP.NET 1.0 and 1.1 Basics 6 August 2nd, 2006 06:23 AM
refresh the parent window when closing the popup ram_siddinen VS.NET 2002/2003 1 January 30th, 2004 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.