Simple Ajax no Workee

Discussion in 'ASP.NET 2.0' started by rmvanduyn, Dec 31, 2008.

  1. Just beginning experimenting with MS Ajax .NET

    We already have an up and running website, that I did not want to mess with so I created an application in a subdirectory, and created a new Visual Studio Express 2005 project with the Ajax template.

    I have used the simpliest example available (the one provided on the asp.net knowledge base the updates the system time, basically one line of code)

    The problem is the code runs as a postback because there is an javascript error in the MS library.

    As this is the most basic example available I can only figure that its because the application is running in a sub directory. I know funny things go on with the web.config, could this be it?

    code is running at www.catprint.bz/editor/ajaxtest.aspx.

    Code is below. Web.config is the standard as created by Visual Studio. Our web site is set to run .NET 2.0 and everything is set to Ajax 1.0xxx per the instructions on asp.net knowledge base.

    Mitch

    <%@ Page Language='VB' smartNavigation='false'%>

    <!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 id='Head1' runat='server'>
    <title>ASP.NET AJAX 1.0 Test</title>
    </head>

    <form id='form1' runat='server'>
    <asp:ScriptManager ID='ScriptManager1' runat='server' ScriptMode='Release'/>
    <asp:UpdatePanel ID='UpdatePanel1' runat='server'>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID='Button1' />
    </Triggers>
    <ContentTemplate>
    <fieldset>
    <legend>Current server date and time</legend>
    <%=DateTime.Now.ToString() %>
    </fieldset>
    </ContentTemplate>
    </asp:UpdatePanel>

    <asp:Button ID='Button1' runat='server' Text='Update' />

    </form>
    </body>
    </html>
     

Share This Page