Welcome Guest Search | Active Topics | Sign In | Register

Dialog with a button on Header/Footer Options
BobbyMx
Posted: Tuesday, June 2, 2009 11:16:15 AM
Rank: Newbie
Groups: Member

Joined: 5/25/2009
Posts: 7
Hi,

I am trying to create a button on a Dialog Header/Footer so that I can then use it to close the Dialog after the user has made a choice. I have a code sample here. The button never stays on the header/footer.

Thanks BobbyMx.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="PixShax.Pages.WebForm3" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:Dialog ID="Dialog1" runat="server" BackColor="#47729F"
ControlSkinID="None" Height="600px"
Width="168px"
HeaderHtml='<asp:Button ID="Button1" runat="server" Text="Button" />'
AllowMove="False" ShowButton="btnGroups">
<HeaderStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #ffbf00 3px solid; padding-left: 4px; font-weight: bold; font-size: 11px; padding-bottom: 2px; color: white; padding-top: 2px; border-bottom: #22456a 1px solid; font-family: verdana" />
<FooterStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana" />
<ContentStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana" />
</eo:Dialog>



<asp:Button ID="btnGroups" runat="server" Text="Groups...." Width="71px"
onclick="btnGroups_Click" />
</div>
</form>
</body>
</html>

eo_support
Posted: Tuesday, June 2, 2009 11:36:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You are confusing about HTML and ASPX. "asp:Button" is ASPX syntax, so you can not use it at places only simple HTML is allowed, such as HeaderHtml property. There is no such syntax to include a server control as a attribute value (inside quotation marks).

In order to have any button in the dialog header, you must use plain HTML. For example:

Code: HTML/ASPX
<input type="button" value="Button1" onclick="window.alert('hi');" />


FooterArea is different. You can edit the dialog's FooterTemplate and put whatever server controls in it. The difference is, FooterTemplate is an ITemplate, so it does take server controls. HeaderHtml is a string. So it only takes simple HTML.

Hope this helps.

Thanks!
BobbyMx
Posted: Tuesday, June 2, 2009 4:17:06 PM
Rank: Newbie
Groups: Member

Joined: 5/25/2009
Posts: 7
Thanks for the answer.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.