|
Rank: Advanced Member Groups: Member
Joined: 11/13/2008 Posts: 43
|
Hi, I'm presently working on a web application in ASP.NET 4, and part of the functionality allows people to register for a free trial of the client's services. This functionality needs to be available in several pages in the app, so I've written it as a UserControl. The client wants the registration form to be a modal dialog, so obviously I've used the EO Dialog control. However, the registration process needs to do some server-side validation, so I'm trying to use the EO Callback panel to call a server-side method. Code is as follows:
Code: HTML/ASPX
<eo:Dialog runat="server" id="dlgFreeTrial" HeaderImageUrl="00020441" HeaderImageHeight="27" ClientSideOnCancel="dlgFreeTrial_Cancel"
MinHeight="100" MinWidth="150" AllowResize="False" ControlSkinID="None"
HeaderHtml='"padding-top:5px">Free Trial</div>'
BackColor="Blue" BackShadeColor="Blue" CloseButtonUrl="00020440" ConfineElementID="">
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<ContentStyleActive CssText="background-color:White;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
<BorderImages BottomBorder="00020409,00020429" RightBorder="00020407,00020427" TopRightCornerBottom="00020405,00020425" TopRightCorner="00020403,00020423" LeftBorder="00020406,00020426" TopLeftCorner="00020401,00020421" BottomRightCorner="00020410,00020430" TopLeftCornerBottom="00020404,00020424" BottomLeftCorner="00020408,00020428" TopBorder="00020402,00020422" />
<ContentTemplate>
<eo:CallbackPanel ID="cbFreeTrial" runat="server" Triggers="{ControlID:cmdApply;Parameter:}">
<table>
<tr>
<td colspan="2" align="center"><h2>Register for a Free Trial</h2></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">To apply for free access</td></tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td>Name</td>
<td><asp:TextBox ID="txtName" runat="server" /></td>
<td colspan="2"> </td>
</tr>
<tr>
<td>Job title</td>
<td><asp:TextBox ID="txtJobTitle" runat="server" /></td>
</tr>
<tr>
<td>Company</td>
<td>
<asp:TextBox ID="txtCompany" runat="server" /> / <asp:CheckBox ID="chkStudent" runat="server" />
</td>
</tr>
<tr>
<td colspan="2" align="right"><asp:Button ID="cmdApply" runat="server" Text="Apply" OnClick="cmdApply_Click" /></td>
</tr>
</table>
</eo:CallbackPanel>
</ContentTemplate>
</eo:Dialog>
However, the problem I'm having is that when the cmdApply button is clicked, it causes a full page refresh i.e. a postback, not a callback. I've tried putting the entire Dialog control inside the Callback panel, but that does the same thing. Any assistance gratefully received. Mark
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We tested your code and it works fine here. Can you try the same in a separate blank page (make sure no master page)?
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 11/13/2008 Posts: 43
|
Thanks for the reply. Yes, I confirm that it works correctly when not used in a MasterPage / ContentPage. However, that's what I want to do. Can you please tell me what I need to do? Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There is nothing particular about just having a master page. What matters is what's in your master page. Some times a code error or invalid markup can trigger unexpected behaviors. It is also possible that you have some other control/code that conflict with the CallbackPanel. So you can try to comment your master page code/html out block by block to see if you can find out what triggered the problem. Once you know what triggered, it should be either very obvious to you why it's not working; or it should be easy for you to duplicate the issue without a master page. In any case, if you believe this is an issue on our end, you can post a test page that duplicates the problem and we will be happy to take a look.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 11/13/2008 Posts: 43
|
Thank you for your reply. I'm pleased to hear that this should work!
I don't BELIEVE there are any markup or compilation errors in the MasterPage or its partial class, and EO.Web is the only non-Microsoft assembly in the web app's \bin folder - all the others begin "Microsoft.xxx" or "System.xxx".
However, I will create a separate blank MasterPage for testing and see if that makes a difference...
|
|