View Full Version : Code behind setting Title property on portlet fails

Jan 15, 2010, 2:04 PM
Hey guys,
When i set the portlet title property from the code behind i get a JS error and the page doesn't render. but if i set the title in design mode it works great how can i programmatic ally set the title.

Note the issue only come-in when i'm setting a title (from code behind) that looks like this "Something : Part - A"

// Fails ON CLIENT
NewPortlet.Title = "Something : Part - A";
NewPortlet.Title = "Something Part A";

<ext:Portlet ID="Portlet11" Title="Something : Part - A" runat="server" HideCollapseTool="true">
<ext:Tool Type="Search" Handler="" />

Any idea how to get around this?

Jan 15, 2010, 2:42 PM
I tried the following and it appears to work correctly.


<%@ Page Language="C#" %>

<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<script runat="server">
protected void Button1_Click(object sender, AjaxEventArgs e)
this.Portlet1.Title = "Something : Part - A";

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Coolite Toolkit Examples</title>
<form runat="server">
<ext:ScriptManager runat="server" />

<ext:Portal runat="server" Border="false">
<ext:ColumnLayout runat="server">
<ext:PortalColumn runat="server">
<ext:AnchorLayout runat="server">
Title="Panel 1"
Html="Portal 1"
<ext:Button ID="Button1" runat="server" Text="Test">
<Click OnEvent="Button1_Click" />

Jan 15, 2010, 3:31 PM
when i am doing it is the initial load of the page and its components i notice in your example you are doing via a ajax method?

Jan 15, 2010, 3:36 PM
Seems to work fine during the initial Page_load as well.

Can you modify my above sample to demonstrate how to reproduce the issue. Once we're able to reproduce the issue with a full .aspx sample we can offer some more suggestions.