MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Polls: How to configure polls and Apply CSS like on Page 66 of Documentation (Closed) (Mono Support )

Viewed 71501 time(s), 28 post(s) 7/15/2011 12:24:25 AMby yousaid

Related topics

khorvat

khorvat

7/28/2011 7:49:08 AM
Hi,

yes we are using the WAP model, WPI installation isn't related to having designer files or not, it installs the compiled MonoX CMS which does't contain any designer files because they are compiled in the assembly. So if you create your own project (solution) that is based on the Web site model then you don't get designer file creating because they are created on the fly by the framework. I suppose you are using the Web site model so we will test this issue on that model too and get back to you.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
imarusic

imarusic

7/28/2011 9:03:05 AM
Hi,

I have just downloaded the latest MonoX using WPI, opened it as a web site, added new user control, copied your code within it, built and got an error because CodeFile property in markup was not set properly.

Before:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>

After:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MonoX_ModuleGallery_Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>

Let us now if everything is ok now,

Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts
yousaid

yousaid

7/29/2011 2:58:31 PM
Greetings,
Well, unfortunately, your changes don't work. After applying your changes, and recompiling the the site, when you attempt to lunch the WebParts catalog, you get this Exception
Image #1 and the webparts catelog will not even Load.

Your Code: Will not compile and throws the exception in Image #1
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MonoX_ModuleGallery_Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>


My Changes to your code: notice the /. Compiles but theows the exception in Image #2
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="/MonoX/ModuleGallery/Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>

Question:
Are you able to get any poll to load with your code? If yes, can you post the code?cheers,
yousaid
This content has not been rated yet. 
206 Reputation 36 Total posts
khorvat

khorvat

7/29/2011 8:59:15 PM
Hi,

in any case when we have provided you with the code it was tested and it was working properly on our side, as you have issue with all of the samples we have provided you with is it possible to schedule a TeamViewer session related to this issue so we can check and fix everything on your side ?

Let us know if this suites you.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
yousaid

yousaid

7/29/2011 9:18:41 PM
Greeetings,
Pick a time that works for you.
cheers,
yousaid
This content has not been rated yet. 
206 Reputation 36 Total posts
khorvat

khorvat

7/29/2011 9:33:33 PM
Hi,

does the 02.08 around the 3-5pm works for you ?

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
yousaid

yousaid

7/29/2011 9:44:24 PM
Perfect.
till then.
cheers,
yousaid
This content has not been rated yet. 
206 Reputation 36 Total posts
khorvat

khorvat

8/18/2011 11:15:45 AM
Hi,

  sorry for the delay I didn't forget about this issue but I was very busy these days. I have found the "thing" that is causing the error and it is related to Web site Project and WAP co-operation.

If you inherit UserControl / WebPart that is build on top of the WAP and you are using the Web site project type the ASP.NET has an issue related to building the control tree so that's why we don't get the control instances - they are all null.

Basically this issue is related to ASP.NET AutoEventWireup functionality and when you turn this on (and it is turned on by default)  then Web site (for some unknown reason) overrides the WAP control tree generation and controls are not instantiated. Dirty fix that I have found is to disable this functionality in case of the Web site project type so you can use the inherited WebPart (Note: at this point I didn't find issues that you may face using this fix but I'm not sure that they won't arise later on). Don' forget that If you disable the AutoEventWireup then you need to override the events such as Page_Load (OnLoad) etc.

To implement dirty fix change the below code from:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>

To:
<%@ Control Language="C#" AutoEventWireup="false" CodeFile="Pollmaster.ascx.cs" Inherits="MonoX_ModuleGallery_Pollmaster" %>

I hope that this will work for you, please let us know if you need any further information.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
1 2 3