0
 <ContentTemplate>
    <asp:HyperLink ID="link" runat="server"></asp:HyperLink><asp:MultiView ID="MultiViewSearchState" runat="server" ActiveViewIndex="0">
        <asp:View ID="ViewCommands" runat="server">&nbsp;<asp:Button ID="btn" runat="server" Text="Select" OnClick="btn_Click" />&nbsp;<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.

2
  • Are you saying you want what is in the ViewSearch to be inside of a popup? Commented Jun 7, 2011 at 15:13
  • Yes, exactly that's what I mean. Commented Jun 8, 2011 at 6:28

2 Answers 2

1

Well, here is an example of a popup in jQuery & CSS: http://www.kompeller.co.uk/6266540/

Sign up to request clarification or add additional context in comments.

Comments

1

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;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.