AJAX script manager within a masterpage in asp.net -


i'm using ajax in page under masterpage. have problem location of script manager. don't want script manager pages, one.

this master page :

         <div>                  <asp:contentplaceholder id="contentplaceholder1" runat="server">                  </asp:contentplaceholder>              </div> 

and page want add script manager it

<asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server">    <asp:scriptmanager id="scriptmanager1" runat="server">     </asp:scriptmanager>     <asp:textbox id="textbox1" runat="server" width="120"></asp:textbox>     <asp:numericupdownextender         id="numericupdownextender1" runat="server" targetcontrolid="textbox1" maximum="9" minimum="1" width="120">     </asp:numericupdownextender> </asp:content> 

when run problem occuer:" control 'contentplaceholder1_scriptmanager1' of type 'scriptmanager' must placed inside form tag runat=server."

so read on internet have put content in master page inside form tag :

          <div>             <form id="form1" runat="server" style="height: 25px">                 <asp:contentplaceholder id="contentplaceholder1" runat="server">                  </asp:contentplaceholder>                 </form>             </div> 

but when problem occures: "a page can have 1 server-side form tag."

i have no idea do, help

in asp.net not allowed have more form tags. instead of having many forms have 1 big form contain content.

in master:

<body>   <form id="form1" runat=server>     <asp:contentplaceholder runat="server" id="maincontent" />     </form> </body> 

in contentplaceholder:

<asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server">     'your code here' </asp:content> 

use search in files check if have more 1 form tag.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -