i’ve just installed new visual studio 2010, and when i create new form and add jquery avaliable and scriptmanager then firefox shows me an eror
Sys.ArgumentException: An element with id ‘form1’ could not be found. Parameter name: elementOrElementId
form looks like this
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
</div>
</form>
</body>
</html>
Instead of:
do:
Also jQuery’s
$function might conflict with MsAjax so make sure you read aboutnoConflictif you are planning on using jQuery. Or even better, because you plan to use jQuery throw away MsAjax and script managers. You don’t need them.