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 August 19th, 2009, 02:11 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default Display or hide ModalPopupExtender based on client-site conditions

Hello,

I am trying to show the ModalPopup message box using ModalPopupExtender with some information by clicking the button (let's say Submit button) on the content form. This form has the client-site function which is checking input boxes on the form after this Submit button has been pressed, and if something wrong, it shows an appropriate client-site [FONT='Arial','sans-serif']Message[/FONT]. The problems: after this [FONT='Arial','sans-serif']Message[/FONT] has been dismissed, my ModalPopupExtender message is showing up anyway. How to avoid this situation? Any suggestions or directions will be appreciated.

Thanks in advance,
[FONT='Calibri','sans-serif']Dmitriy [/FONT]
 
Old August 20th, 2009, 12:42 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default I believe...

I believe you just need to return false; on your client side script which will stop the transaction...

Post your client side script and we can know for sure.
__________________
Jason Hall

Follow me on Twitter @jhall2013
 
Old August 20th, 2009, 12:46 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I did that in my script before, but it did not work.
 
Old August 20th, 2009, 12:47 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default Show your code...

Post your code so we can see what you have now?
__________________
Jason Hall

Follow me on Twitter @jhall2013
 
Old August 20th, 2009, 01:03 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I've solved my problem using different approach. Instead of showing the ModalPopup message box after pressing "Submit" button, I've created "dummy" link-button (not visible of course) and assigned TargetControlID property to this "dummy" button. "Show/Hide" message action I am controlling from inside my code-behind.
This is the script:
Code:
<styletype="text/css">
.noDisplay
{
display: none;
}
</style>

<divID="divModalPopup">
<cc1:ModalPopupExtenderID="ModalPopupExtender2"runat="server"
TargetControlID="dummy"
PopupControlID="Panel13"
BackgroundCssClass="modalBackground"
DropShadow="true"
OkControlID="OKButton">
</cc1:ModalPopupExtender>
<asp:LinkButtonrunat="server"ID="dummy"CssClass="noDisplay"Text="Click me..."/>
<asp:PanelID="Panel13"runat="server"CssClass="modalPopup"Style="display: none"Width="270px"BorderStyle="Double"ScrollBars="Auto">
<br/>
<tablestyle="width: 100%;"bgcolor="#79A9B9"cols="2"align="center"
cellpadding="2"cellspacing="2"border="2"bordercolor="olive">
<tr>
<tdalign="center">
<b>Attention User!</b>
</td>
</tr>
<tr>
<tdalign="center">
Your request has been submitted. Please make a note of the job information for your records.
</td>
</tr>
</table>
<br/>
<divalign="center">
<asp:ButtonID="OKButton"runat="server"Text="OK"/>
</div>
</asp:Panel>
<br/>
</div>


Thanks for consideration and responding
-Dmitriy
 
Old August 20th, 2009, 01:04 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

Good for you!
__________________
Jason Hall

Follow me on Twitter @jhall2013





Similar Threads
Thread Thread Starter Forum Replies Last Post
selection based on conditions rajesh_css XSLT 3 October 2nd, 2008 08:06 PM
ModalPopupExtender question mpodol1 BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 0 September 23rd, 2008 03:29 PM
Hide Tabs in a Form Based on a field. snoopy92211 Access VBA 1 November 18th, 2004 02:33 PM





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