Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Others
cms.evaluation
cms.general
comm.businessdesk
comm.campaigns_csf
comm.catalog
comm.datawarehousing
comm.deploy.
comm.general
comm.sdk
comm.solutionsites
comm.userprofilemgt
commerce.analysis
crm
crm.deployment
crm.developer
hiserver.general
mobility.miserver
sharep.portal.config
sharep.portal.dev
sharep.portal.docmgmt.
sharep.portal.installation
sharep.portal.sdk
sharep.portal.search
sharep.team.caml
sharep.teamservices
sharep.windowsservices
sharep.winservices.dev
sharepoint.portalserver
siteserv.knowledgemgr
siteserver.analysis
siteserver.commerce
siteserver.css
siteserver.general
siteserver.publishing
siteserver.sdk
siteserver.search
site-server.site-mgmt
site-server.webpost
  
 
date: Thu, 2 Jun 2005 14:07:05 -0500,    group: microsoft.public.cmserver.evaluation        back       


How can I include a class into the DefaultConsole.ascx   
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
date: Thu, 2 Jun 2005 14:07:05 -0500   author:   David De Cotis

Re: How can I include a class into the DefaultConsole.ascx   
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
date: Fri, 3 Jun 2005 09:32:32 +0600   author:   Chester Ragel

Re: How can I include a class into the DefaultConsole.ascx   
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
date: Fri, 3 Jun 2005 07:51:14 -0500   author:   David De Cotis

Re: How can I include a class into the DefaultConsole.ascx   
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
date: Fri, 3 Jun 2005 23:43:48 +0600   author:   Chester Ragel

Re: How can I include a class into the DefaultConsole.ascx   
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
date: Fri, 3 Jun 2005 13:13:57 -0500   author:   David De Cotis

Re: How can I include a class into the DefaultConsole.ascx   
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
date: Sun, 5 Jun 2005 00:09:08 +0600   author:   Chester Ragel

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us