Reputation: 5396
<ContentTemplate>
<asp:HyperLink ID="link" runat="server"></asp:HyperLink><asp:MultiView ID="MultiViewSearchState" runat="server" ActiveViewIndex="0">
<asp:View ID="ViewCommands" runat="server"> <asp:Button ID="btn" runat="server" Text="Select" OnClick="btn_Click" /> <asp:Button ID="ButtonClear" runat="server" Text="Clear" OnClick="ButtonClear_Click" />
</asp:View>
<asp:View ID="ViewSearch" runat="server">
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" OnClick="ButtonCancel_Click" />
<dyncontrols:SearchControl runat="server" ID="searchControl"/>
</asp:View>
</asp:MultiView>
</ContentTemplate>
When pressing the button inside ViewCommands, the View is set to ViewSearch. However, this is done with inline html, and I'd like it to be a popup. What is the best way to achieve this using only css and/or javascript?
I've read this and this but it wasn't enough for me to understand how to do it in ASP.NET using Views. I have also seen ModalPopupExtenders being used, but those don't work on this page because of some UpdatePanel so I figured I'd do a css/js solution.
Upvotes: 0
Views: 1620
Reputation: 5266
Well, here is an example of a popup in jQuery & CSS: http://www.kompeller.co.uk/6266540/
Upvotes: 1
Reputation: 156
You'll need to set the CssClass on the elements that you want to style then simply set the styles as the links you provide suggest. Alternatively if you are using .NET 4 you can set the "ClientID". The CSS may be something like:
.button
{
position: absolute;
padding: 20px 40px;
background: #fff;
border: 2px solid #ccc;
}
Upvotes: 1