views:

318

answers:

1

HI!

I need to add to my asp.net project new item called AJAX Web form , but in spite of installing AJAX Control Toolkit I can not add to my project new item in form of Ajax Web Form.

Does anyone knew what I have to do ?

screen of my Visual Studio: http://img708.imageshack.us/i/visualstudioajaxproblem.jpg/

+1  A: 

This template doesn't exist in VS 2010. It was built-into VS 2008, but did not require the ajax control toolkit (it isn't related to the toolkit).

The ajax webform is identical to a regular webform except that it has a script manager and a placeholder javascript function for pageLoad. I imagine the VS team didn't think it justified having its own item template in VS 2010 (I agree).

Just select "Web Form" from the new item dialog. Then add a script manager like this:

<body>
    <form id="form1" runat="server">
        <div>
          <asp:ScriptManager ID="ScriptManager1" runat="server" />
        </div>
    </form>
</body>

You can also optionally add the script in the header if you need it... it should look like this:

<head runat="server">
    <title></title>
    <script type="text/javascript">

      function pageLoad() {
      }

    </script>
</head>
Stephen M. Redd