ASP.NET Atlas, first impressions

Posted by – October 1, 2007

I’ve been spending some moments evaluating the news features of ASP.NET, at first look ASP.NET Atlas seems promising, but at this moment I couldn’t find anything similar to reRender feature that we have in Ajax4JSF, this is can be a serious problem, because how can we specify which portion of such page must be updated? Well, lemme try another solution for this later.

In my example my page code is something like we have below:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <br />
        <asp:UpdatePanel ID="contactsPanel" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblName" runat="server" Text="Name"/>
                <asp:TextBox ID="txtName" runat="server"/>
                <asp:Button ID="btnSave" runat="server" Text="Save"
                   onclick="btnSave_Click" CausesValidation="False"/>
                <br />
                <br />
                <asp:Label ID="lblContactName" runat="server"
                   Text="Contact name:"/>
                &nbsp;
                <asp:Label ID="lblTypedName" runat="server" Width="106px"/>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

and the server code for this page is something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        lblTypedName.Text = txtName.Text;
    }
}

At first look ASP.NET Atlas seems to be a little limited on its Ajax approach, I’ll investigate and make sure about that.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>