Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > New Webpart View modes: 
User avatar
Member
Member
mickey-invision - 11/25/2009 12:00:22 AM
   
New Webpart
I'm trying to make a custom webpart for my first kentico project, but I'm having issues putting a namespace... I want to put a namespace so that it outputs a separate DLL, so I don't have to deploy ALL the DLLs everytime. If there is a better way, I'm all ears...


using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CMS.PortalControls;

namespace CMS.Webparts.WPG
{

public partial class CMSWebParts_WPG_Navigation : CMSAbstractWebPart
{
//protected Button Button1;
//protected Label Label1;

protected void Page_Load(object sender, EventArgs e)
{
Button1.Text = (string)PartInstance.GetValue("ButtonText");

}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToString();

}
}
}

User avatar
Kentico Support
Kentico Support
kentico_radekm - 12/2/2009 2:42:28 AM
   
RE:New Webpart
Hello.

Do you receiving any error when using this approach? If so, what this error message says? Could you please copy&paste it here, or link here some screenshot? Thank you.

Best Regards,
Radek Macalik
Support Engineer