>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

ASP.NET Ajax: Creating Pretty Popups - popup panel br rounded runatserver corners asp ajax

 
Registered tutorials: 501
Registered Users: 32540



Rating: 4.22 out of 9 votes cast


  
Category: Ajax and .NET

ASP.NET Ajax: Creating Pretty Popups

Digg this   Post to del.icio.us

Abstract: Shows how to create and use Popup modal window developed with ASP.NET

So on the site I am working on, I need some popups. I have used Lightbox before and it works wonderfully, but I wanted to try something new this time. Since I was already knee-deep in the ASP.NET Ajax framework, I figured I might as well try their ModalPopupExtender and see how that works.

Its pretty simple to get a popup to show up, but I wanted something a little prettier than the standard format of a big rectangle. Maybe some rounded corners? As it just so happens…there is a RoundedCornersExtender in the toolkit. So I figured if I put those two together I would get one sexy popup. It wasn’t quite that simple…

In the beginning…
So if you check out the live sample of the modal popup you will get a good idea of how to build a basic example. Using this demo as a template I created this:

<div id="Div1" runat="server">Click for Modal popup 2</div>
    
<asp:Panel ID="Panel1" runat="server" 
style="display:none; height: 200px; width: 200px; background-color: #ff0000;">
   I am a popup
   <br /><br />
   <asp:Button ID="Button1" runat="server" Text="Cancel" />
   <asp:Button ID="Button2" runat="server" Text="Button" /><br />

   <br /><br /><br />
</asp:Panel>
    
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" 
TargetControlID="Div1" PopupControlID="Panel1" CancelControlID="btnCancel" 
OkControlID="btnOK" BackgroundCssClass ="modalBackground" />

It ain’t pretty but it works. Lets see how it does what it does.


Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 3561
Unique Hits: 3103


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 9.2 11.2 51.8 61.1 187.9 215
Current 3 4 52 62 222 264
Previous 11 12 0 0 333 388
Nov 19 12 14 71 92 206 231
Nov 18 10 12 0 0 142 156
Nov 17 16 20 83 94 140 153
Nov 16 8 8 0 0 271 315
Nov 15 1 1 69 79 0 0
Nov 14 6 9 78 90 247 283
Nov 13 10 13 76 93 157 175
Nov 12 15 19 89 101 161 185
Highest 22 29 89 101 333 388


Script Execution Time: 0.40142 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2