PDA

View Full Version : [CLOSED] Windows + Toolbar



Zarzand
Nov 14, 2008, 6:14 PM
<TopBar>
<Coolite:Toolbar ID="tblUploadFile" runat="server">
<Items>
<Coolite:ToolbarButton ID="tbtnModelBook" Text="Model Book" runat="server" ToggleGroup="mb">
<AjaxEvents>
<Click OnEvent="tbtnModelBook_OnEvent" />
</AjaxEvents>
</Coolite:ToolbarButton>
<Coolite:ToolbarButton ID="tbtnProQuest" Text="Pro Quest" runat="server" ToggleGroup="mb">
<AjaxEvents>
<Click OnEvent="tbtnProQuest_OnEvent" />
</AjaxEvents>
</Coolite:ToolbarButton>
</Items>
</Coolite:Toolbar>
</TopBar>







protected void tbtnModelBook_OnEvent(object sender, AjaxEventArgs e)
{
}

protected void tbtnProQuest_OnEvent(object sender, AjaxEventArgs e)

{

}


When I add AjaxEvents Click I'm getting a java script em I doing something wrong here. I'm trying to have toolbar in my window

Thank You

Vladimir
Nov 14, 2008, 6:30 PM
Hi,

I can't reproduce any errors. Here is my test code



<%@ Page Language="C#" %>
<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>ComboBox PostBacks - Coolite Toolkit Example</title>
<script runat="server">

protected void tbtnModelBook_OnEvent(object sender, AjaxEventArgs e)
{
ScriptManager2.AddScript("alert('1');");
}

protected void tbtnProQuest_OnEvent(object sender, AjaxEventArgs e)
{
ScriptManager2.AddScript("alert('2');");
}
</script>

</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager2" runat="server" />

<ext:Window runat="server" Title="Window">
<TopBar>
<ext:Toolbar ID="tblUploadFile" runat="server">
<Items>
<ext:ToolbarButton ID="tbtnModelBook" Text="Model Book" HandleMouseEvents="true" runat="server" ToggleGroup="mb">
<AjaxEvents>
<Click OnEvent="tbtnModelBook_OnEvent" />
</AjaxEvents>
</ext:ToolbarButton>
<ext:ToolbarButton ID="tbtnProQuest" Text="Pro Quest" runat="server" ToggleGroup="mb">
<AjaxEvents>
<Click OnEvent="tbtnProQuest_OnEvent" />
</AjaxEvents>
</ext:ToolbarButton>
</Items>
</ext:Toolbar>
</TopBar>
</ext:Window>


</form>
</body>
</html>