I need assistance with a DNN skin issue. Here's the background.
I have functionality in one of my legacy VB DNN skins that writes the full URL of the parent page. The code is:
<% If PortalSettings.ActiveTab.Level > (0) Then Response.Write(PortalSettings.ActiveTab.BreadCrumbs(PortalSettings.ActiveTab.Level-1).FullUrl) %>
This works fine in my legacy VB skins. However, I am now using a different skin set written in C#. When I apply the above code to the C# skin, it returns the following error message:
Could Not Load Theme: /Portals/_default/Skins/cust08/InteriorSub.ascx,
Error:
c:\inetpub\vhosts\dnnpro.com\httpdocs\Portals_default\Skins\cust08\InteriorSub.ascx(107):
error CS1002: ; expected
I tried tweaking the code, but no success. I'm sure this is an easy fix, but I'm stumped!
Thanks in advance.
The error there is pretty specific You need to put a Semi colon after the code, it is C#
The code you'll likely use would be
<%
If (PortalSettings.ActiveTab.Level >0)
{
Response.Write(PortalSettings.ActiveTab.BreadCrumbs(PortalSettings.ActiveTab.Level-1).FullUrl);
}
%>
Related
Here is a full video explanation of the problem.
It begins by throwing up the Autocad Help for some reason.
Then Shows a message that says "Could not load an object because it is not available on this machine"
Then I get a message like this:
The first thing called by Autocad button is showWallTypeManagementForm()
Here is the Code that accompanies that Error Message in the Debugger:
Public Sub showWallTypeManagementForm()
frmWallTypeManager.Show
End Sub
or as a screenshot.
here is the form (frmWallTypeManager) that it is attempting to show:
As per your video, you are attempting to use a 32bit DAO.DLL with a 64bit OS. It is unfortunate but that is one of the DLL's that just cannot be used with 64bit Autocad. From the looks of your form, you are probably getting some information from a database with DAO. This will cause your errors.
I'm trying to create a session variable on the home page skin that will return either true or false depending on if the user has previously visited the home page in the current session. I then need to check the value and if this isn't their first time visiting the home page, I need to echo/print javascript.
I've tried
Session("HomePageSeen") = "false"
Session["HomePageSeen"] = "false";
Also, it's a DNN6 site. My understanding is that DNN6 uses C# instead of VB. However, at the top of my .ascx skin file, there's this line of code:
<%# Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
So I'm not sure if I should write this in C# or VB.
I know how I'd do this in PHP and I feel like the same logic would apply here, but I'm no where near as well versed in .Net, VB, or C#.
The skin can be in either language, in whatever version of DNN that you want (the core code switched to C# in DNN 6, but that doesn't affect the language used by extensions). The language for the skin is based on that language attribute in the Control directive
You should be able to get and set a session value using that Session property. Something like this:
<% If Session("HomePageSeen") Is Nothing Then %>
<% Session("HomePageSeen") = True %>
<script>alert('hello');</script>
<% End If %>
Is there any way to use Localizable.strings with NSLocalizedString(#"KEY", #"") in xCode 4.5 for iOS6 like in older iOS5?
Here is my sample code:
In Localizable.strings
"KEY" = "Hello World!";
In .m script
NSString *tempString = NSLocalizedString(#"KEY", NULL);
NSLog(#"My String is: %#", tempString);
The log for iOS5.1 is: "My String is: Hello World!"
The log for iOS6 is: "My String is: KEY"
...I'm really going to become crazy! Where is my error?
Thanks a lot!!!
Their is no need to create a new project and copy, just delete the localizable files, create it once again and you will be fine.
The localized strings in my current app still work in iO6. I typically just use NSLocalizedString(#"KEY", NULL); Are you sure yours is working properly for 5.1?
Look at answer for post: IOS String Localization stops working when adding additional localization
It works for me. Clean build + remove from simulator (or phone) fix the error.
The only solution I have found is:
restart with a new project from xCode template
enable Localization for at least 2 languages
drag inside all old files from corrupted project
copy the contend of old storyboards into new ones
do frequent snapshots just in case of necessity
I really don't know where was the problem, but now all works again well as usual.
Change the language settings of simulator.
I was missing a semi-colon at the end of a line in one of my string-files. The compiler didn't report it even when I cleaned the project at built it again. First after restarting XCode the error was reported and I could find it and fix it.
I have a WPF Application with a subfolder that contains a WF Activity and a CodeActivity.
At compile-time on the Workflow that uses the CodeActivity, I get this error:
The tag 'Dictionary' does not exist in XML namespace 'clr-namespace:System.Collections.Generic;assembly=mscorlib'. Line 4 Position 8.
The portion of code that reports the error is generated by the Visual studio built-in Activity designer. E.g. this:
<sap:WorkflowViewStateService.ViewState>
<scg3:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">False</x:Boolean>
<av:Point x:Key="ShapeLocation">270,2.5</av:Point>
<av:Size x:Key="ShapeSize">60,75</av:Size>
<av:PointCollection x:Key="ConnectorLocation">300,77.5 300,107.5 300,112.5</av:PointCollection>
</scg3:Dictionary>
I'd like to know if I am trying to something that is not allowed or if I am missing something.
Thanks in advance,
Gianluca
I had a similar problem today; at least the same error message. The problem for me was that the build action of the .xaml file was set to Page. It needs to be set to XamlAppDef. If you open a vanilla Workflow console application project, you'll see that. You can't change it in the drop down, you need to edit the .csproj file (again, compare to vanilla VS workflow console project).
I'm working on a Windows Forms solution with many winform ui projects.
There is a class library project that contains some custom shared controls, named MyControls.
Now, when I create a control in MyControls
that is composed of one or more controls in the same project, I run into problems.
I either get compilation warnings: warning CS0436: The type 'MyType' in 'path-to\MyType.cs' conflicts with the imported type 'MyType' in 'MyControls.dll'. Using the type defined in 'path-to\MyType.cs'. Or I get a bunch of different compilation errors, all pointing to "MyControls.dll" (error CS0234 - "are you missing an assembly reference?").
I get either the errors, or the warnings, never both.
How to solve this?
Note
I added visual-studio-2010 because that's the version I experienced the problems with. No idea if this relates to other versions too.
I found that Visual Studio adds a self-reference to MyControls when I drop a control from the MyControls project on another control in MyControls:
<Reference Include="MyControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
My current work-around is to manually delete this reference from the MyControls.csproj using a text editor.
When I've done this, everything works fine, until I drop another control that triggers a self reference.
Better solutions are appreciated!
you can make a small and "legal" change in your solution and get the "legal" solution... lets say your project name is: "project01"
go to references folder in your project - one of your references called "project01" - just remove it...
the the warning is very fair! you design a form and in the other hand import your project as a reference!
I know this thread is a bit old, but I just went looking for a solution to this issue, and it seems that MS doesn't have anything other than what Marijn suggested earlier:
https://connect.microsoft.com/VisualStudio/feedback/details/613502/automatically-add-self-reference
Hopefully it's fixed in VS 2012.