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

You are currently viewing the ASP.NET 3.5 Professionals 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 October 5th, 2009, 03:03 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy Launching a Modal Popup Window from Server Code

Hello Everybody,
I am having the "REAL" problem trying to launch a Modal Popup Window from inside the Server Code behind. I have found the Microsoft tutorial on the WEB http://www.asp.net/LEARN/Ajax-Control-Toolkit/tutorial-27-cs.aspx but by some reason it is not working on my page. Maybe because my page is using the master page, or I am trying to call Modal Popup from inside AJAX TABControl? Anyway it is not working. I've done everything Microsoft suggested to do, and even more; I've tried both RegisterStartupScript() and RegisterClientScriptBlock() methods inside the btnPromoteSelected_Click() event.

Code:
protectedvoid btnPromoteSelected_Click(object sender, EventArgs e)
{
ArrayList batchList = newArrayList();
if (Session["CHECKED_ITEMS"] != null)
{
batchList = (ArrayList)Session["CHECKED_ITEMS"];
if (batchList != null && batchList.Count > 0)
{
//Do some JOB here!!!!!!!!!!!!!!!!!!!!!!}
else{
//Display the Message here:
//if (!this.ClientScript.IsClientScriptBlockRegistered("key"))// this.ClientScript.RegisterClientScriptBlock(this.GetType(), "key", "launchModal();", true);if (!this.ClientScript.IsStartupScriptRegistered("key"))
this.ClientScript.RegisterStartupScript(this.GetType(), "key", "launchModal();", true);
}
}
else{
//Display the Message here://if (!this.ClientScript.IsClientScriptBlockRegistered("key"))// this.ClientScript.RegisterClientScriptBlock(this.GetType(), "key", "launchModal();", true);if (!this.ClientScript.IsStartupScriptRegistered("key"))
this.ClientScript.RegisterStartupScript(this.GetType(), "key", "launchModal();", true);
}
}
In my case the launchModal() function is not being involved? I am completely frustrated. Any suggestions will be appreciated.

Thanks,
Dmitriy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Communication Between a modal popup and a parent page swizz182g Javascript How-To 0 August 27th, 2009 04:41 PM
Communication between a parent window and a modal dialog window swizz182g Javascript 0 August 27th, 2009 04:41 PM
Modal Popup Extender - not modal? jenbuh ASP.NET 3.5 Professionals 5 July 27th, 2009 07:04 PM
Displaying modal dialog from server code gp_mk HTML Code Clinic 16 July 1st, 2007 07:55 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM





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