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
Register
| 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 August 19th, 2009, 02:11 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
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]
  #2 (permalink)  
Old August 20th, 2009, 12:42 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
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
  #3 (permalink)  
Old August 20th, 2009, 12:46 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I did that in my script before, but it did not work.
  #4 (permalink)  
Old August 20th, 2009, 12:47 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
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
  #5 (permalink)  
Old August 20th, 2009, 01:03 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
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
  #6 (permalink)  
Old August 20th, 2009, 01:04 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

Good for you!
__________________
Jason Hall

Follow me on Twitter @jhall2013
 


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
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



All times are GMT -4. The time now is 08:38 AM.


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