Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 27th, 2011, 09:43 AM
Friend of Wrox
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default Set Focus on ModalPopupExtender

Hello Programmers,
I am having BIG problem on setting the focus inside my ModalPopupExtender control. I have a simple message popup box (created using this control) with OK button to “dismiss” the box. The situation in my case is like this:
I have Master Page with toolbar. On this toolbar I have the “Save Record” button. After the user click this button and the record has been saved successfully, the user will see the pop-up message box that the record has been saved. The user is pressing the button to close the box. Everything works fine from the toolbar. But the user asked me to let them save the record using F10 function key. I let them do this, but now I have a problem: by some reason (actually this is my guessing the reason:”The message pop-up box loosing the focus”) the user supposes to click the OK button twice to close the message box.
Any suggestions,directions or help to solve this problem will be appreciated.

Bellow is my modal pop-up box
<asp:LinkButtonrunat="server"ID="dummySavedData"CssClass="noDisplay"Text="Click me..."/>
<asp:PanelID="PanelSavedData"runat="server"CssClass="modalPopup"Style="display: none"
<tablestyle="width: 100%;"bgcolor="#79A9B9"cols="2"align="center"cellpadding="2"
<b>Attention User!</b>
Data has been saved.
This is the part of my delegate function to show the message:
privatevoid SavePageData(object sender, EventArgs e)
This is script on Master Page to call the SavePageData() function
(actually this script is involving the same "Save Record" button click on the toolbar wich is working OK as I've described above):
//Implementing all Keyboard shortcut keys here:
document.attachEvent('onkeyup', KeysShortcut);
//Now we need to implement the KeysShortcutfunction 
function KeysShortcut ()
var control = null;
if (event.keyCode == 121) //F10 key for the button "Save" //D.M. 12/29/2010 To tie F10 keyboard button to the "Save" functionality
control = document.getElementById("ctl00_btnSave");
if (control != null)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
set focus sameer_1981 Intro Programming 1 February 27th, 2007 09:14 AM
set focus akibaMaila VB.NET 2002/2003 Basics 1 July 12th, 2005 05:56 PM
how to set focus waley .NET Web Services 1 May 25th, 2004 02:38 PM

All times are GMT -4. The time now is 07:38 PM.

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