Hello all, I am trying to override the AuthoringReeditSaveAndExitAction Console event. So, I created a new Class titled Tracking.cs see code below using System; using System.Web.UI.WebControls; using Microsoft.ContentManagement.Publishing; using Microsoft.ContentManagement.WebControls.ConsoleControls; namespace WoodgroveNetVB.ConsoleButtons { public class Tracking :AuthoringReeditSaveAndExitAction { public class Tracking { protected override void PerformActionBehavior() { Posting pPosting = cmsHttpCOntext.current.posting; if(pPosting.State ==PostingState.Published) { Base.PerformActionBehavior(); // 'response.redirect("newpage") } //'End if } //'End Override void }//'//End public class }// 'End namespace } In the DefaultConsole I inlcuded the following code to import the Class Tracking: <%@ Register TagPrefix="WoodgroveNetVBConsole" Namespace="WoodgroveNetVB.ConsoleButtons" Assembly="WoodgroveNetVB" %> The problem is that when I execute the code I get the following error message. Compiler ErrorMessage: BC30466:The namespace or the type 'ConsoleButtons' for the Imports 'WoodgroveNetVB.ConsoleButtons' cannot be found. Ligne 39 : Imports System.Web.UI.HtmlControls Ligne 40 : Imports System.Web.UI.WebControls Ligne 41 : Imports WoodgroveNetVB.ConsoleButtons Ligne 42 : Ligne 43 : Namespace ASP Can anyone out there see where the problem lies. Thank-you all
Hi David De Cotis, I think the source you have provided here is not correct (you are having wrong nested class, must be some kind of a typing mistake). Anyway that is not the problem. I think you have not added a reference to that assembly in your project. In the web project in references right click and add a reference to the project - WoodgroveNetVB. Cheers, Chester. "David De Cotis" wrote in message news:1ac1f06944fa469baec981817a7fe90e@ureader.com... > Hello all, > I am trying to override the AuthoringReeditSaveAndExitAction Console event. > So, I created a new Class titled Tracking.cs see code below > > using System; > using System.Web.UI.WebControls; > using Microsoft.ContentManagement.Publishing; > using Microsoft.ContentManagement.WebControls.ConsoleControls; > > namespace WoodgroveNetVB.ConsoleButtons > { > public class Tracking :AuthoringReeditSaveAndExitAction > { > public class Tracking > { > protected override void PerformActionBehavior() > { > Posting pPosting = cmsHttpCOntext.current.posting; > if(pPosting.State ==PostingState.Published) > { > Base.PerformActionBehavior(); > // 'response.redirect("newpage") > } //'End if > > } //'End Override void > > }//'//End public class > }// 'End namespace > } > > In the DefaultConsole I inlcuded the following code to import the Class > Tracking: > > <%@ Register > TagPrefix="WoodgroveNetVBConsole" > Namespace="WoodgroveNetVB.ConsoleButtons" > Assembly="WoodgroveNetVB" > %> > > The problem is that when I execute the code I get the following error > message. > > Compiler ErrorMessage: BC30466:The namespace or the type 'ConsoleButtons' > for the Imports 'WoodgroveNetVB.ConsoleButtons' cannot be found. > > Ligne 39 : Imports System.Web.UI.HtmlControls > Ligne 40 : Imports System.Web.UI.WebControls > Ligne 41 : Imports WoodgroveNetVB.ConsoleButtons > Ligne 42 : > Ligne 43 : Namespace ASP > > > Can anyone out there see where the problem lies. > > Thank-you all
Hello Chester, I am trying to reference my .VB class, but I cannot becuase .NET will only reference .DLL and not .VB. How can I reference my .VB class to the defaultConsole.ascx. Many Thanks David
Hi David De Cotis, You can't add .vb as reference. If it is a .vb file, then it is in the same project. The best way is to create a class library project and have that extended console action class in that project. Then you can add a reference of the class library to your web project. Cheers, Chester. "David De Cotis" wrote in message news:02d0914f2ffe4a37a100ad2f74c6a53e@ureader.com... > Hello Chester, > > I am trying to reference my .VB class, but I cannot becuase .NET will only > reference .DLL and not .VB. How can I reference my .VB class to the > defaultConsole.ascx. > > > Many Thanks > David
Chester, thanks for getting back to me .... right now I am all confused... can you please guid eme step by step on what I am supposed to do ..... Step1: Create a new Project Class Library (but this class is also in .VB) Step2: How do I have extended console action class in the newly created project. Step3: How do I reference the new class library. From what I am seeing I can only reference DLL's and not .VB Please help my out .... It has been three days that I am trying to do this . ... thanks
Hi David De Cotis, If you have source in .vb then, create a new vb class library project. -In visual studio go to file->new->project. -select vb project and class library and give a name to your project. Copy the class you have(Tracking class) to that class library. -your new project will have a .vb class. you can use the same file. Copy the content from your old .vb file to this one. Now add reference to Microsoft.ContentManagement.Publishing.dll, Microsoft.ContentManagement.Common.dll and Microsoft.ContentManagement.WebControls.dll to that class library project -these dlls can be found in 'c:\program files\microsoft content management server\server\bin' folder. Now you must be able to build this project. This project will give you a dll file which can be referred in your web project. HTH Cheers, Chester. "David De Cotis" wrote in message news:67274c8cec0446da8a4f772717b9a1f9@ureader.com... > Chester, thanks for getting back to me .... right now I am all > confused... > can you please guid eme step by step on what I am supposed to do ..... > > Step1: Create a new Project Class Library (but this class is also in .VB) > > Step2: How do I have extended console action class in the newly created > project. > > Step3: How do I reference the new class library. From what I am seeing I > can only reference DLL's and not .VB > > > Please help my out .... It has been three days that I am trying to do > this . > .. > > thanks