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...Building ExtensionsBuilding ExtensionsModulesModulesIssues LocalizeString and adding DNN controls in aspxIssues LocalizeString and adding DNN controls in aspx
Previous
 
Next
New Post
4/4/2015 5:57 PM
 

It fails at design time so no intellisense but it's not just an "intellisense" issue, is that public/protected properties and functions in the code behind (and inherithed ones like those from PortalModuleBase) are not "recognized" in the ascx code.

If I try to declare a property in code behind:

    Public  ReadOnly Property TestMe() As String
        Get
            Return "It Works"
        End Get
    End Property

Then in the ascx code I try something like:

<% = TestMe %>

I get this error (not at build but underlined in realtime VS ide): TestMe is not declared. It may be inaccessible.... ...

I'm really struck with that... don't know where to look. I deleted the designer file and recreated it but whit no luck.

 
New Post
4/4/2015 6:37 PM
 
Try actually running it. I have seen circumstances when VS loses the plot yet the code actually runs.

VS is just an assistant. It does not always know the full truth; plus a run time error (if it comes) may give you a better clue.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
4/5/2015 5:38 AM
 

Hallo Richard, sadly it won't build as well, giving the same error.

It's like if the ascx cannot access the code behind for some reason. I also deleted and recreated the .designer file but with no luck.

I'm working with dal2 vb Christoc template and I get this kind of behaviour right off the bat after install and initialization. Infact the Localization function provided by Christoc template in ascx markup, which should be inherited from PortalModuleBase won't work.

There are several workaround I could exploit working directly from code behind but this seems to be symptomatic of a more "serious" misconfiguration or similar issue. Also in some situations, it could be really useful to be able to access code behind properties/function from ascx (like for example to add some dynamica parts in javascript code in ascx without having to render all the JS from code behind).

Another very odd issue I'm experiencing is in the Edit.ascx page, provided with Christoc template, even if I remove the reference:

<%@ Register TagPrefix="dnn" TagName="label" Src="~/controls/LabelControl.ascx" %>

And remove the 3 labels:


.....

In the first line, that declares the control I have the error: Namespace or type specified in the Imports 'DotNetNuke.UI' doesn't contain any public member or cannot be found.....

But I don't have the import anywhere.... not even at project level.

UPDATE: I created a new solution from scratch with a single user control class added from VS template. I experience the same behaviour, I cannot access code behind properties/functions from user control ascx. So I changed the class to aspx and inherited from Page, and with my surprise I had the same problem. I'm new to Web Applications, I usually work with Website Projects, and I wonder if this is a common behaviour in WAP (I'm sure that this should work with Website Projects)
 
New Post
4/5/2015 12:41 PM
 
Can you narrow this down. Try in sequence:
- creating building & running a standard web app project (just the wizard nothing else)
- same with an added usercontrol
- a project built off the template (nothing of your own *just* the template)
- same with an added usercontrol

At which point does it all break down?

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesIssues LocalizeString and adding DNN controls in aspxIssues LocalizeString and adding DNN controls in aspx


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