2014-07-09 17 views
5

I ScriptManager'ın hakkında bir sorum var, benim sorumScriptManager'ın Usta sayfası ve İçerik sayfa

<asp:ScriptManager ID="scriptManger1" runat="server"> 
    <Scripts> 
     <asp:ScriptReference Name="MsAjaxBundle" /> 
     <asp:ScriptReference Name="jquery" /> 
     <asp:ScriptReference Name="bootstrap" /> 
     <asp:ScriptReference Name="respond" /> 
     <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" /> 
     <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" /> 
     <asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" /> 
     <asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" /> 
     <asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" /> 
     <asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" /> 
     <asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" /> 
     <asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" /> 
     <asp:ScriptReference Name="WebFormsBundle" /> 
    </Scripts> 
</asp:ScriptManager> 

ve benim içerik sayfasına çünkü eğer ScriptManager ihtiyaç Ben bir ScriptManager gerekir çünkü ben bir ScriptManager gerek ve ben bir ScripManager koymak ve benim uygulama çalıştırdığınızda bir ScripManager koyarsanız benim uygulama çalıştırmak zaman buradan bir hata verin, çünkü ben 2 ScriptManager var çünkü ben ana sayfada 1 ve içerik sayfasında 1 var çünkü .

Sorum şu: Bu sorunu nasıl gideririm?

+0

tam olarak alıyorsanız hatalar nelerdir ? – tnw

+0

Buradaki etiket, lütfen işaretleyin? – CarAlex

cevap

11

Sadece 1 ScriptManager'ınız olabilir. Bu kesinlikle ana sayfanıza gitmeli. ScriptManager işlevselliğini diğer sayfalarınızda almak için bir ScriptManagerProxy kullanmanız gerekecektir. Bu proxy'yi, ana sayfada yüklenen gerçek ScriptManager'a yapılan tüm istekleri istifleme olarak düşünün.

diğer sayfalarında bu ufaklığı Toss: Burada

<asp:ScriptManagerProxy id="ScriptManagerProxy1" runat="server"/> 

daha detaylı olarak bu nasıl uygulanacağı hakkında iyi bir okuma geçerli:

http://www.dotnetheaven.com/article/ajax-package-scriptmanagerproxy-control-in-asp.net-using-vb.1

İlgili konular