Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








EnhancingJavaScript Sample


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="">

    <form id="Main" runat="server">
        <asp:ScriptManager runat="server" ID="scriptManager" />

        <p>This example creates an instance of the Person class 
            and puts it in the "Demo" namespace.</p>

        <input id="Button1" value="Create Demo.Person" 
            type="button" onclick="return OnButton1Click()" />

    <script type="text/javascript" src="Namespace.js"></script>
    <script type="text/javascript" language="JavaScript">

    function OnButton1Click() 
        var testPerson = new Demo.Person(  
            'John', 'Smith', '');
        alert(testPerson.getFirstName() + " " +    
            testPerson.getLastName() );

        return false;