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.

VS 2008 WebPart Developmet - CodeFile Code Behind  (Mono Support )

21635 put(a) pogledan, 5 odgovor(a) 29.3.2011. 7:54:20Kreirao(la) peterg
peterg

peterg

29.3.2011. 7:54:20
Hi,

I am busy building a small webpart and i have noticed that my code differs from the code in the manuel

your reference
<%@ Control Language="C#" AutoEventWireup="true" Inherits="MonoSoftware.MonoX.Samples.HelloWorld" Codebehind="HelloWorld.ascx.cs" %>
when i build a page it looks like this:

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

Note the Underscores from Inherit and the CodeBehind, sorry im not sure why this happens. Sorry it might be a very noob question.

Peter
Ovaj sadržaj još nije ocijenjen. 
246 Reputacija 35 Ukupno objava
peterg

peterg

29.3.2011. 8:05:43
Oh nevermind...it all has to do with if you open it as a website or as a project.....

now some of my goodies will work

Ovaj sadržaj još nije ocijenjen. 
246 Reputacija 35 Ukupno objava
khorvat

khorvat

29.3.2011. 11:31:24
Hi,

yes it is important to know which project type you have opened / created. There are two types of projects a "Web Site project" and "Web Application" (the one that MonoX uses - although you can use both in your custom solutions).

Here are some other useful resources:

Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio
Converting a Web Site Project to a Web Application Project

Regards
Ovaj sadržaj još nije ocijenjen. 
15993 Reputacija 2214 Ukupno objava
denis

denis

29.3.2011. 13:44:56
Yes, you have to use the Web application instead of the Web site project. Although both approaches have similar names, Web site project type is something totally different (no project files, very long compilation times, speicalized folders for application classes, etc) and MonoX does not support it.
Ovaj sadržaj još nije ocijenjen. 
7207 Reputacija 956 Ukupno objava
peterg

peterg

29.3.2011. 13:53:13
Thanks,

Yes im sitting here arguing with VS to get a custom portal setup so i can then add Web App Pages and webparts rather than the website solution options....

ill get it done :)

Peter
Ovaj sadržaj još nije ocijenjen. 
246 Reputacija 35 Ukupno objava