Hi dwatling! My first post here, but I'm quite adept at working with the AJAX framework and AJAX Control Toolkit. Oneway to show your modal popup is done from the client-side using javascript.
Your modal popup extender (mpe) has a property called "BehaviorID" - if you would like to control the behavior of the mpe via javascript, you will need to set this property. As a rule of thumb, I set my BehaviorID property to the same value as the ID property. After adding this value, your mpe markup will be as such:
CODE
<cc1:ModalPopupExtender ID="mpeDualLoginAtempt" runat="server"
BehaviorID="mpeDualLoginAtempt"
TargetControlID="popDualLoginAtempt"
PopupControlID="DualLoginAtempt"
CancelControlID="btnDualLoginAtempt"
BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
After setting this property, you can then reference this control via javascript. Based on your code below, pressing the "popDualLoginAtempt" button will automatically make the modal popup appear; however, to programatically make the panel popup, use the following java script:
CODE
function DisplayModalPopup() {
// get reference to modal popup using the AJAX api $find() function
// this funciton gets a reference to a ajax control toolkit object if the behavior
// id property is specified
var mpe = $find('mpeDualLoginAtempt');
if (mpe) {
mpe.show();
}
}
Each control in the control toolkit has methods available for client-side development. I recommend downloading the source code for the AJAX Control Toolkit and explore the accompanying .js files for the control you're working with.
-pk
QUOTE(dwatling @ 28 Jun, 2007 - 03:57 AM)

I have a page with a ModalPopupExtender that I would like to show (or not) based on a QueryString value when the page loads. It works fine when clicking on a botton to activate it. I am working in VB.
Ho do I either:
1) Programmaticaly "click" the botton
or
2) Programatically "show" the ModalPopupExtender?
CODE
<asp:Panel ID="DualLoginAtempt" runat="server" Height="300px" Width="300px" CssClass="modalPopup">
<div class="center"><h2>Another user is already logged in on this account</h2>
This account will be locked for 1 hour.<br />
<br />
<asp:Button ID="btnDualLoginAtempt" runat="server" Text="Close" /></div></asp:Panel>
<asp:Button ID="popDualLoginAtempt" runat="server" Text="Dual Login Atempt" Visible="True" />
<cc1:ModalPopupExtender ID="mpeDualLoginAtempt" runat="server"
TargetControlID="popDualLoginAtempt"
PopupControlID="DualLoginAtempt"
CancelControlID="btnDualLoginAtempt"
BackgroundCssClass="modalBackground"
>
</cc1:ModalPopupExtender>