Thanks for you reply. I have figured it out. I had to remove the autoPostback=true property as I was calling OnClient event. I have one more question like is there have anyway to access command property from my custom base class. What I am trying to do is I have a template which consists of RadDockzone and I will dynamically add all module(ascx). I was doing before with webparts and in code behind I can access the webpart verb and add a new custom verb for example in content section there will be edit verb where I will pass content id and call popup get the contents from database. To get access of webpart verb I had to implement webpart IWebActionable interface. So just wondering if possible like this with reddock command.
I am building a CMS where requirement is admin will have flexibility to manage contents with drag and drop. So I was started using Webparts then after I have found Telerek Raddock does almost same things with nice visual interface. So I am now moving it to apply telerik Raddock. One more thing the Telerik DockHandle property I want to make it true only in Admin and all others should not be drag and drop facility. So if you have any demo page then it will really help me a lot.
One more issue in aspx or ascx page telerik intellicense is not coming.
please see the below code which one I have done with webparts. So if something like available with telerik dock command......
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 Castle.Windsor;
using CMSEngine.Core;
using CMSEngine.Core.Domain;
using CMSEngine.Web.Util;
using CMSEngine.Web.UI;
using CMSEngine.Core.Service.SiteStructure;
using CMSEngine.Core.Service.Membership;
namespace CMSEngine.Web.Modules.Content
{
public partial class Content : System.Web.UI.UserControl,IWebPart,IWebActionable
{
private IDocumentService _documentService;
private IWindsorContainer _container;
private string actionLink = "";
public long DocumentID
{
get
{
long result = 0;
if (ViewState["documentID"] != null)
{
result = long.Parse(ViewState["documentID"].ToString());
}
return result;
}
set
{
ViewState["documentID"] = value;
}
}
#region IWebPrt Properties
/// <summary>
/// set Title of webpart control
/// </summary>
protected string _title = "[Generic Title]";
public string Title
{
get { return _title; }
set { _title = value; }
}
/// <summary>
/// set Subtitle of webpart control
/// </summary>
protected string _subTitle = "";
public string Subtitle
{
get { return _subTitle; }
set { _subTitle = value; }
}
/// <summary>
/// set Caption of webpart control
/// </summary>
protected string _caption = "";
public string Caption
{
get { return _caption; }
set { _caption = value; }
}
/// <summary>
/// set Description of webpart control
/// </summary>
private string _description = "";
public string Description
{
get { return _description; }
set { _description = value; }
}
/// <summary>
/// set TitleUrl of webpart control
/// </summary>
private string _titleUrl = "";
public string TitleUrl
{
get { return _titleUrl; }
set { _titleUrl = value; }
}
/// <summary>
/// set TitleIconImageUrl of webpart control
/// </summary>
private string _titleIconImageUrl = "";
public string TitleIconImageUrl
{
get { return _titleIconImageUrl; }
set { _titleIconImageUrl = value; }
}
/// <summary>
/// set Title of webpart control
/// </summary>
private string _catalogIconImageUrl = "";
public string CatalogIconImageUrl
{
get { return _catalogIconImageUrl; }
set { _catalogIconImageUrl = value; }
}
#endregion
//implement the IWebActionable interface to add Edit and Section setting verbs
#region IWebActionable
private WebPartVerbCollection m_Verbs;
// This property implements the IWebActionable interface.
WebPartVerbCollection IWebActionable.Verbs
{
get
{
if (m_Verbs == null)
{
User cmsEngineUser = this.Page.User.Identity as User;
ArrayList verbsList = new ArrayList();
WebPartVerb editVerb = new WebPartVerb("editVerb", actionLink);
editVerb.Text = "Edit";
editVerb.Description = "Edit";
editVerb.Visible = true;
editVerb.Enabled = true;
verbsList.Add(editVerb);
m_Verbs = new WebPartVerbCollection(verbsList);
return m_Verbs;
}
return m_Verbs;
}
}
#endregion
public Content()
{
this.Title = "Content";
}
protected void Page_Load(object sender, EventArgs e)
{
DocumentID = 2;
InitialzePage();
}
private void InitialzePage()
{
this._container = ContainerAccessorUtil.GetContainer();
this._documentService = _container.Resolve<IDocumentService>();
Document document = this._documentService.GetById(DocumentID);
Literal htmlControl = new Literal();
if (document != null)
{
htmlControl.Text = document.Content;
this.Title = document.Title;
actionLink = string.Format("OpenPopup('Edit Content', '../../Modules/Content/ContentEdit.aspx', 700, 500); return false;");
}
else
{
actionLink = string.Format("OpenPopup('Edit Content', '../../Modules/Content/ContentEdit.aspx', 700, 500); return false;");
}
this.plcContent.Controls.Add(htmlControl);
}
}
}