Mono 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.

Mono Support VS 2008 WebPart Developmet - CodeFile Code Behind 

Viewed 7820 time(s), 5 post(s). 3/29/2011 7:54:20 AMby peterg
peterg
1

peterg 3/29/2011 7:54:20 AM

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
This content has not been rated yet. 
246 Reputation 35 Total posts
peterg
2

peterg 3/29/2011 8:05:43 AM

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

This content has not been rated yet. 
246 Reputation 35 Total posts
khorvat
3

khorvat 3/29/2011 11:31:24 AM

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
This content has not been rated yet. 
11551 Reputation 1644 Total posts
denis
4

denis 3/29/2011 1:44:56 PM

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.
This content has not been rated yet. 
6785 Reputation 874 Total posts
peterg
5

peterg 3/29/2011 1:53:13 PM

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
This content has not been rated yet. 
246 Reputation 35 Total posts