I am happy to report.. i got it to work!!1
Thx for all the guidance a long the way..
For all of you who may be running into the same issues as me..
Here is what you need to do to get a custom web part to compile dynamical inside monox..
First.. just get the basic code up and running using the portal project that comes with monox.. make sure you move the solution files to the root of your monox and make sure your running visual studio as a administrator or else you may have some off upgrade issues and visual studio may report problems detecting the version of the portal solution..
I set the solution properties to something more my liking..
Assemble Name = Scene.Web
Namespace = Scene.Web
Once.. you pass this problem.. now its time to create a simple folder to hold your webpart..
just right click on the portal solution and create a folder.. call it something.. in my example I called my folder CusScene..
Now right click on the folder and add a new item - custom web user control.. I named my control WebPart.. Ok.. now you can code some stuff your self or just copy and past the following code into the controls.
WebPart.Ascx - Main Design - Source HTML
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebPart.ascx.cs" Inherits="Scene.Web.CusScene.WebPart" %>
<
p
>
Name?
<
asp:TextBox
ID
=
"TxtName"
runat
=
"server"
></
asp:TextBox
>
<
asp:Button
ID
=
"CmdGO"
runat
=
"server"
onclick
=
"CmdGO_Click"
Text
=
"GO"
/>
</
p
>
<
p
>
HELLO
<
asp:Label
ID
=
"lblName"
runat
=
"server"
Text
=
"Label"
></
asp:Label
>
</
p
>
<
p
>
</
p
>
WebPart.ascx.cs
Note the most important part here.. is to make sure you inherit.. from monox..
MonoSoftware.MonoX.BaseAutoRegisterPart or something below this.
using
System;
using
System.Data;
using
System.Configuration;
using
System.Collections;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
MonoSoftware.MonoX;
namespace
Scene.Web.CusScene
{
public
partial
class
WebPart : MonoSoftware.MonoX.BaseAutoRegisterPart
{
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
void
CmdGO_Click(
object
sender, EventArgs e)
{
lblName.Text = TxtName.Text;
}
}
}
WebPart.ascx.designer.cs - should be auto generated for you wehn you build the project.. but here the code anyways..
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Scene.Web.CusScene {
public
partial
class
WebPart {
/// <summary>
/// TxtName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected
global::System.Web.UI.WebControls.TextBox TxtName;
/// <summary>
/// CmdGO control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected
global::System.Web.UI.WebControls.Button CmdGO;
/// <summary>
/// lblName control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected
global::System.Web.UI.WebControls.Label lblName;
}
}
Once you compile the code.. you can not just move the control into the C:\Monox\MonoX\ModuleGallery - WebPart.ascx .. its good idea to change this some.. or use your own dir so you cant conflict with anything that monox has in its default gallery.. I plan to just put all my controls in their own folder... but for a quick test.. this worked just fine..
Once i have the part inside their.. i went into monox - logged into admin.. then put any page into design move.. and i could simply place my control anywhere inside monox..
presto!! this is exactly what I was trying to do.. now i can go wild and designing and building any custom control I need and simple allow my website users to drag and drop it into monox! woohoo..