开发者

ASP.NET - adding Ajax Web Form to solution

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/visualstudioa开发者_开发知识库jaxproblem.jpg/


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜