Hi there, thanks for your reply.
I followed your advice and cleared the AcceptButton property completely. When set like that, the dialog doesn't close at all and it doesn't appear to postback either. I dont think I've ever had it postback propertly. When the AcceptButton property is set to the button again, the dialog closes but it still doesn't trigger a postback. If I also set the AcceptButtonPostback property to true, again the dialog doesn't close at all and doesn't postback.
Apologises and I understand your point about the way I had written the pseudo code - it was just to show you what I was trying to achieve rather than me expecting the dialog to change the page life cycle. You're right about steps a and b being in different code blocks. One of the things I had tried was putting step b in the button's server side click event handler. I think because the dialog isn't posting back, this code is never firing.
However triggering the postback event from the button IS the behaviour I'm trying to achieve as I can catch the click event separately server side after the postback has occurred.
One thing I never mentioned on my first post is at the moment the dialog is part of a user control and other controls within this user control are using the MS AJAX extenders (watermark, validator callout etc). I had planned to use the dialog in a number of user controls similar to this. Do you think this could be a reason for what I am experiencing?
EDIT:
I have experimented further with this. Completely new page with basic button added to trigger the opening of the dialog.
Code: Visual Basic.NET
<eo:Dialog ID="AccountLookupDialog" runat="server" BorderStyle="Solid" BorderWidth="1px"
BackShadeColor="LightGray" BackShadeOpacity="50" BorderColor="#728EB8" ControlSkinID="None"
ShadowColor="LightGray" ShadowDepth="4" HeaderHtml="Savings Account Application Message"
Height="120px" Width="268px" BackColor="White">
<HeaderStyleActive CssText="padding-right: 10px; padding-left: 10px; font-size: 12px; font-weight: bold; background-image: url(00070202); padding-bottom: 2px; padding-top: 2px; font-family: arial" />
<ContentStyleActive CssText="padding-right: 10px; padding-left: 10px; font-size: 11px; padding-bottom: 10px; padding-top: 10px; font-family: verdana; background-color: #f8fafd" />
<FooterStyleActive CssText="padding-right: 10px; padding-left: 10px; font-size: 11px; padding-bottom: 10px; padding-top: 4px; font-family: verdana; background-color: #f8fafd" />
<FooterTemplate>
<asp:Button ID="AcceptButton" runat="server" Text="OK" />
</FooterTemplate>
</eo:Dialog>
<asp:Button ID="Button3" runat="server" Text="Button" />
Code Behind Click Event Handler
Code: Visual Basic.NET
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
AccountLookupDialog.InitialState = EO.Web.DialogState.Visible
AccountLookupDialog.ContentHtml = "Test"
End Sub
In this example, there is nothing in the page_load event. When Button3 is clicked the dialog appears. When the AcceptButton is clicked it now DOES postback. However, rather than disappearing it reappears after postback.
I have also tried loading the dialog at first page_load with the usual
If Not Page.IsPostback etc... Again when the AcceptButton is clicked it still reappears after postback. Its like it's ignoring the IsPostback property.
So now I am really at a loss on what to do next. Any ideas guys?
Many thanks
Darren