Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...The name The name 'EditURL' does not exist in the current context
Previous
 
Next
New Post
8/26/2008 4:05 AM
 

Hi all,

I am writing a module in C# and when I try and run it I get this error: "The name 'EditURL' does not exist in the current context".

All the code is there, as far as I can see. The iActionable in the class declaration, etc...

This is in the CodeBehind for the iActionable Members:

[CODE]

#region IActionable Members

    public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions
    {
        get
        {
            //create a new action to add an item, this will be added to the controls
            //dropdown menu
            ModuleActionCollection actions = new ModuleActionCollection();
            actions.Add(GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, this.LocalResourceFile),
                ModuleActionType.AddContent, "", "", EditUrl(), false, DotNetNuke.Security.SecurityAccessLevel.Edit,
                true, false);

            return actions;
        }
    }

#endregion

[/CODE]

Does anyone have a solution for this error, or be able to point me in the right direction?

Thanks in advance,


Lee B
Owner
S@W Designs
Outsourcing partner
Developer forums and Help.
 
New Post
8/26/2008 9:02 AM
 

Check that your module control inherits from DotNetNuke.Entities.Modules.PortalModuleBase which contains the definitions for several overloads of the EditUrl method.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
8/26/2008 9:36 AM
 

Hi and thanks William,

yes my module does inherit the PortalModuleBase, code below:

using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.Localization;

namespace SawDesigns.Modules.HotBox
{
    public partial class ViewHotBox : PortalModuleBase, IActionable
    {
 

This is what has confused me with the error.

In the end I copied code from a working module to the problem module and it made no difference. So I rewrote it.

Thanks for the help.


Lee B
Owner
S@W Designs
Outsourcing partner
Developer forums and Help.
 
New Post
1/5/2009 9:33 PM
 

I am having this exact issue. I have a C# module that is inhertiting from PortalModuleBase but I get teh following error when I try to compile.

'The name 'EditURL' does not exist in the current context'

Does anyone know how to fix this? I am using VS2008 with the vsi kits to try and make this module. I do not understand why this is not working.

Jerel

 
New Post
1/5/2009 10:16 PM
 

OK, I know what the problem is and I bet it happened to the original poster as well.

After stepping away for a bit and then coming back to look at the problem, I realized what was going on. I am developing in C# and all the examples and sample code is in VB. After opening the PortalModuleBase.vb file, I realized that the function call was EditUrl where as the error was telling me EditURL, noticae the capitalization. C# is case sensitive where VB is not and, thus, the error.

I should have seen this the first time sometimes you cant see the forest for the trees. I hope this helps someone in the future who is copying code from the core modules into a C# project. Remember case sensitivity.

Jerel

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...The name The name 'EditURL' does not exist in the current context


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out