Has anybody tried to run CS Controls in a Non CS web site or environment

rated by 0 users
This post has 3 Replies | 2 Followers

Madhukar Ayachit
Not Ranked
Posts 3
Points 60
By: Madhukar Ayachit
Posted: Wed, Sep 5 2007 12:05 PM

Hi there

I have been trying hard to develop a web Part using CS Controls (SP2). I am simply adding CS controls like  this.Controls.add( new CSControl).

But when I try to place my WebPart in a Web Page (Assuming Page is Inherited from System.Weeb.UI.Page) it gives me a runtime error saying "The operation attempted requires that the current page inherit CSThemePage".

My review says CSControlUtility.CS (GetCSThemePage) checks whether CSControl is placed inside ThemePage or not. I doubt whether CS Controls are available for non CS pages or not .

Specially in Share point where we don't have liberty to change the nature of page.

Please review the following CS Code block -

/// <summary>

/// Gets the CS theme page from the current page, or throws an exception.

/// </summary>

/// <param name="page">The page.</param>

/// <returns></returns>

public virtual CSThemePageBase GetCSThemePage(Page page)

{

if (page == null)

page = System.Web.HttpContext.Current.CurrentHandler as Page;

CSThemePageBase themePage = page as CSThemePageBase;

if (themePage == null)

throw new InvalidOperationException("The operation attempted requires that the current page inherit CSThemePage.");

else

return themePage;

}

I also tried to extend a DotNet site which is possible if i Inherit my page from CSPage , host my site under a CS site as a virtual directory. This requires Communityserver.config and SiteUrl.config also.

 

Has anybody tried to run CS Controls in a Non CS web page or Web site

 

 

 

 

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,344
Points 63,185
CS Developers
By: Ben Tiedt
Posted: Wed, Sep 5 2007 11:41 PM In reply to

Currently, CS2007 controls (Chameleon) require that the page they're hosted on inherits from CSThemePageBase -- Chameleon uses the base page to define the page-level context for which the Chameleon controls on the page should render.

You can still access the base API.  You just cannot host a Chameleon control within a page that doesn't inherit from CSThemePageBase.

Ben Tiedt's Blog

 
  • Post Points: 20 |
Madhukar Ayachit
Not Ranked
Posts 3
Points 60
By: Madhukar Ayachit
Posted: Fri, Sep 7 2007 6:49 AM In reply to

CS2007 APIs play around csContext object which is not available in non CS domains. Has anybody tried and tested scope of CS APIs . Do we have any code snippet or example  demostrating practical use  CS APIs for Non CS Domain (Dot Net or Sharepoint).

 

 

 

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,344
Points 63,185
CS Developers
By: Ben Tiedt
Posted: Fri, Sep 7 2007 8:18 AM In reply to

I've worked with the CS API outside of CS -- but it does require moving over communityserver.config, siteurls.config, all of the DLLs, and the languages/ folder (from web).

External application access to CS data will be easier in CS2008 by use of the new REST API.

Ben Tiedt's Blog

 
  • Post Points: 5 |
Page 1 of 1 (4 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com