Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  problem with ScriptManager
Previous Previous
 
Next Next
New Post 8/30/2007 9:22 PM
User is offline dotnetdude2
16 posts
10th Ranked


problem with ScriptManager 

Hi,

I am trying to run a simple module with ScriptManager and I can run my sample with one control but as soon as I add another instance to the same page I am getting an error message :

Again code is working fine if I have only one instance; but when I add a second I am getting this:

Unhandled error loading module.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled Error Adding Module to Pane6 ---> System.InvalidOperationException: Only one instance of a ScriptManager can be added to the page. at System.Web.UI.ScriptManager.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---

my page / code below :

protected

void Button1_Click(object sender, EventArgs e)"New Time : " + System.DateTime.Now.ToString();

<%

<%

@ Control language="C#" Inherits="YourCompany.Modules.MySampleModule2.ViewMySampleModule2" CodeFile="ViewMySampleModule2.ascx.cs" AutoEventWireup="true"%>@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

<%

Namespace="System.Web.UI" TagPrefix="asp" %>@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>

<

<

</

<

asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px" BorderStyle="Solid" BorderColor="1">asp:ScriptManager ID="ScriptManager1" runat="server">asp:ScriptManager>asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

<ContentTemplate>

 

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

 

<br >

 

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />

 

</

<

</

</

</ContentTemplate>asp:UpdatePanel>asp:Timer ID="Timer1" runat="server">asp:Timer>asp:Panel>

 

{

Label1.Text =

}

 
New Post 8/31/2007 12:41 PM
User is offline Chris Hammond
2722 posts
engagesoftware.com
5th Ranked








Re: problem with ScriptManager 

You should check if the manager is already registered on the page, if so, don't register it again.

AFAIK


Chris Hammond
Engage Software
St. Louis, MO
314.966.4000


The leading provider of DotNetNuke skinning, training and custom module development.
Official DotNetNuke® Training Provider
 
New Post 8/31/2007 12:50 PM
User is offline dotnetdude2
16 posts
10th Ranked


Re: problem with ScriptManager 

I am not using register command/code ; I dropped ScriptManager contol in my control;  that is why I posted complete page source

in any case I was able to fix it; but i am not sure if this 'Kosher' solution

I dropped ScriptManager control on the default.aspx page and I used ScriptManagerProxy control to point to the default page.

is this kosher?????

again I am trying to use ScriptManager control and UpdatePanel control in my module for AJAX postback; if you have a sample that doesn't requer Microsoft AJAX ScriptManager control to refresh/post back UpdatePanel; please post it.

 

 

 
New Post 9/4/2007 10:17 AM
User is offline Jon Henning
1594 posts
www.codeendeavors.com
5th Ranked










Re: problem with ScriptManager 

Changing the core code is not recommended as it makes your upgrade process much more difficult.  The DNN Framework already provides a method to register the script manager for you. 

DotNetNuke.Framework.AJAX.RegisterScriptManager()


 
New Post 9/4/2007 7:50 PM
User is offline dotnetdude2
16 posts
10th Ranked


Re: problem with ScriptManager 

thank you very much; it's working but now I have another problem:

my c# code looks like this, and if you want I can post my html /asp source.

        protected void Timer1_Tick(object sender, EventArgs e)
        {
            RetriveData();
        }

        private void RetriveData()
        {
            WSMonitor.BAL.DataWrapper wrapper = new WSMonitor.BAL.DataWrapper((PortalModuleBase)this);
            string sql = "SELECT top 10 table_name, column_name FROM information_schema.columns order by newid()";
            DataSet data = wrapper.SelectCurrentPortal(sql);
                GridView2.DataSource = data;
                GridView2.DataBind();
        }
        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            if (DotNetNuke.Framework.AJAX.IsInstalled())
            {
                DotNetNuke.Framework.AJAX.RegisterScriptManager();
               
            }
            if (!Page.IsPostBack)
            {
                RetriveData();
            }
}

if I have only one module on the page, this code is running fine and I am getting data back every 2 seconds, as soon as I add the same module to another pane or another instance to the same pane, the code is stop working for one module but it still works for another; in the nutshell it works only if I have only one module; looks like that script manager can update only one module; is it possible to force the script manager to manage / update multple controls? in my case I need to have 4 modules on the page and every module/control should be able to use ajax to refresh it self with different refresh interval.

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  problem with ScriptManager
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Convert Visitors to Customers
In order to bring value to your users, we must first understand them. VIVIDSITES will help you build a custom web application and interactive marketing tools that your users will thank you for. We marry high-end creative with head banging technology to entertain and convert visitors into paying customers. Call 314.514.0505 or visit us at http://www.vividsites.com to find out how.
- V I V I D S I T E S -
Gearworx Web Hosting
As a premier provider of Web Hosting, Private/White Label hosting, Server Colocation, Dedicated Server, and other Managed Services, Gearworx offers an array of services designed to more effectively manage strategies driving businesses on the Web. Headquartered in Fremont, California our state of the art tier one data centers and distributed managed services environment enables Gearworx to offer your business enterprise level solutions through simplified processes.
Gearworx Web Hosting
Glanton: Enterprise Intranet Specialists Using DNN
Glanton Solutions are a premier provider of sevices for large corporates lloking to outsource Intranet sites.
www.glanton.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP