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



Rating: 3.83 out of 6 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: 2494
Unique Hits: 2174


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 7.6 8.3 37.7 43.2 140.8 160
Current 8 8 36 37 114 125
Previous 4 5 54 61 271 315
Jul 22 11 11 15 18 0 0
Jul 21 13 13 17 18 247 283
Jul 20 3 3 56 66 157 175
Jul 19 3 5 0 0 161 185
Jul 18 0 0 67 80 0 0
Jul 17 6 6 61 65 118 131
Jul 16 16 18 71 87 249 283
Jul 15 12 14 0 0 91 103
Highest 16 20 77 88 271 315


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