ASP.NET Podcast Show #121 - Phil Haack with an ASP.NET MVC Demo - Video

Subscribe to Everything.

Subscribe to WMV format.

Subscribe to M4V for iPod Users.

Subscribe to MP3 (Audio only).

Download WMV.

Download M4V for iPod Users.

Download MP3 (Audio Only).

Original Url: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2008/07/29/asp-net-podcast-show-121-phil-haack-with-an-asp-net-mvc-demo-video.aspx

Show Notes:

Source Code:

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcApplication2.Views.Home.Index" %>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%= Html.Encode(ViewData["Message"]) %></h2>
    <p>
        To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
    </p>
        Region 1: <span id="region1"></span>
        <hr />
        Region 2:<span id="region2"></span>
        <p>
            <input type="button" onclick="DoSomething()" value="Click Me" />
        </p>
       
        <script type="text/javascript">
            function DoSomething() {
                $.getJSON("/Home/GetJson", null, function(data) {
                    $("#region1").text(data.Message1);
                    flash('#region1');
                    $("#region2").text(data.Message2);
                    flash('#region2');
                });
            }

            function flash(selector) {
                $(selector)
                    .css('opacity', 0)
                    .animate({ backgroundColor: 'khaki', opacity: 1.0 }, 800)
                    .animate({ backgroundColor: '#ffffff' }, 350, function() {
                    this.style.removeAttribute('filter');
                });
            }
        </script>
       

</asp:Content>

No Comments