Inserting Grid into a web control library

Hello,

We have inherited the aspose grid control into one of our classes in a web control library. When we try to load this control into a web page we have the following missing manifest ressource exception for Aspose.Grid.Web.StyleResource.resources:

Erreur source:

 
Ligne 17 : 
Ligne 18 :         WebControlLibrary.WebCustomControl1 a = new WebControlLibrary.WebCustomControl1();
Ligne 19 :         this.Controls.Add(a);
Ligne 20 :     }
Ligne 21 : }


Fichier source : c:\Documents and Settings\vlemadre\Mes documents\Visual Studio 2005\WebSites\WebSiteEssaiAscx\Default.aspx.cs Ligne : 19

Trace de la pile:

 
[MissingManifestResourceException: Impossible de trouver des ressources appropriées pour la culture spécifiée ou la culture neutre. 
Assurez-vous que "Aspose.Grid.Web.StyleResource.resources" a été correctement 
incorporé ou lié dans l'assembly "WebControlLibrary" au moment de la 
compilation ou que tous les assemblys satellites requis sont chargeables et 
complètement signés.]
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +655
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +681
   System.Resources.ResourceManager.GetString(String name, CultureInfo culture) +77
   System.Resources.ResourceManager.GetString(String name) +6
   Aspose.Grid.Web.GridWeb.() +155
   Aspose.Grid.Web.GridWeb.OnInit(EventArgs e) +1830
   System.Web.UI.Control.InitRecursive(Control namingContainer) +459
   System.Web.UI.Control.AddedControl(Control control, Int32 index) +327
   System.Web.UI.ControlCollection.Add(Control child) +263
   _Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\vlemadre\Mes documents\Visual Studio 2005\WebSites\WebSiteEssaiAscx\Default.aspx.cs:19
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +31
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +68
   System.Web.UI.Control.OnLoad(EventArgs e) +88
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3035


Informations sur la version : Version Microsoft .NET Framework :2.0.50727.42; Version ASP.NET :2.0.50727.210

Any help would be greatly appriciated, thanks in advance

Vincent

Hi Vincent,

We have found the problem. We will post a fixed dll soon. Please wait for that.

Thank you.

Hi,

The attachment is the fixed version 1.7.4.2

Let me know if it works. Thank you.

Yes, it works but I have a problem when I insert the contol into the page control, the event provokes an exception (similar to thread/58740). Must I construct a composite control to have both the placeholder and the grid in a DLL library.

Thanks in advance for all your help,

Vincent

Hi,

You only need to create a place holder in the page(the aspx file). You may also insert the grid into another control, for examples, Panel, Table, etc.

To do so is because the grid need to be run in a "form". So you may also insert the grid into the form control like this:

Control uc = Page.LoadControl("WebUserControl1.ascx");
uc.ID = "uc1";
this.FindControl("TestUserControl1").Controls.Add(uc);
The "TestUserControl1" is the name of the page.

OK.

Thank you.