titlecontrol not exist

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/11/2008 12:21:46 AM
Gravatar
Total Posts 26

titlecontrol not exist

 

hi

As u know tht i m working on mojoporatl..currently i hav installed mojoporatl succesfully but now i m watching ur video & try to add a page using codesmith while watching ur video...to resolve the issue for titlecontrol..

Error 2 The name 'TitleControl' does not exist in the current context C:\Documents and Settings\amol.meghe\Desktop\mojoportal\mojoportal\Myproj.UI\Myproj\MyprojModule.ascx.cs 66 13 Myproj.UI
what u hav done i didnt understand tht..plz tell me how to solve it..

virendra

 

 

 

9/11/2008 2:23:17 AM
Gravatar
Total Posts 26

Re: titlecontrol not exist

 

 

Close this issue I have resolved this problem..

thnks

virendra

 

 

10/27/2009 10:57:17 PM
Gravatar
Total Posts 9

Re: titlecontrol not exist

Hey, wish you'd posted a solution!  I'll post for anyone who subsequently encounters this error when following Joe's "Creating a mojoPortal Feature" video.  Though it's not clear what actually works, Joe gets around the problem in the video with various incantations, saves, rebuilds, etc.  None of this work for me.  To get past the immediate error, I instantiated TitleContol within the current control's class i.e.,

  public ModuleTitleControl TitleControl = new ModuleTitleControl();

So far so good...

10/28/2009 4:33:02 AM
Gravatar
Total Posts 9

Re: titlecontrol not exist

Instead of above, add following to your control's class:

  protected ModuleTitleControl TitleControl;

Cheers,

BidNo

10/28/2009 5:45:37 AM
Gravatar
Total Posts 18439

Re: titlecontrol not exist

Hi,

If you are using separate projects for your modules, you need to add a reference to mojoPortal.Web project and copy the <pages><controls> section of the mojoPortal Web.config into your project Web.config.

Then you should not need to instantiate the control with code, it is only needed to add the module title control declaratively in your .ascx file like this:

<portal:ModuleTitleControl EditText="Edit" EditUrl="~/NewsLetterSubscribeModule/NewsLetterSubscribeModuleEdit.aspx" runat="server" id="TitleControl" />

EditText and EditUrl are optional and can be used if you have additional supporting pages for your feature, you can specify the url to an edit page and it will show the edit link and pass the pageid and moduleid to your page as query string params.

Hope it helps,

Joe

11/22/2009 4:30:20 PM
Gravatar
Total Posts 10

Re: titlecontrol not exist

I was able to finally get this to work. The issue had to do with Visual Studio not generating the correct code based on the designer.

To fix the issue, try these steps:

In the .ascx file, select all but the first line and cut from your control. (leave the <%@ Control ... %> intact). Build, see errors. Then paste back what you just removed. Build again, errors disappear.

3/20/2010 8:50:43 PM
Gravatar
Total Posts 9

Re: titlecontrol not exist

Steve Land posted a fix to this problem in his blog for anyone that still has this issue.

 

http://techblog.strongeye.com/archive/2009/12/16/creating-a-mojoportal-module.aspx

 

Basically, you have to do it in this order from CodeSmith:

 

1. Copy the .ascx.cs code, Save.

2. Copy ONLY the first line of the .ascx code, Save

3. Copy the rest of the .ascx code, Save.

 

 

This did it for me.

11/11/2010 10:20:11 AM
Gravatar
Total Posts 13

Re: titlecontrol not exist

steve1, I followed your advice and it works perfectly, the errors disappear, will not bring any problems in future?

11/11/2010 10:58:40 AM
Gravatar
Total Posts 13

Re: titlecontrol not exist

Dear, I am following the video of the creation of modules and I have a doubt because Joe video copy a master page I had designed, I suppose to speed up the tutorial and I see eye to adjust the namespace "mojoPortal.Web" by "WebStore.UI" but that more changes?

 

2/7/2012 8:00:54 PM
Gravatar
Total Posts 27

Re: titlecontrol not exist

I'm aware this is an old topic, but this bug is still very alive using Visual Studio 2010 and the latest MojoPortal sources.

I followed the documentation here and made a new blank module, and when the error appeared I got rid of it after a couple "cut all but the first line, save, paste what you cut, save" tries. It built fine once, then the error came back and just won't go away.

It is interesting and frustrating how TitleControl is always the only control who fails.

Has anyone found another workaround?

Edit: Fixed bad redaction, oops.

2/9/2012 12:49:10 PM
Gravatar
Total Posts 27

Re: titlecontrol not exist

Finally found why the TitleControl error happened: I somehow didn't paste the "<%@ Control" line from the CodeSmith template generated code.

I've created two more projects from zero after that and they compile without incident.

You must sign in to post in the forums. This thread is closed to new posts.