The quick start guides you through the steps of adding a simple popover (Popup with owner element) control to your application. Such popup control is similar to a rich tooltip which will show or hide as per the actions specified by ShowTrigger and HideTrigger. For information on how to add ASP.NET MVC Edition controls, see Adding Controls.
Follow the steps given below to get started:
Create a new MVC application using the ComponentOne or VisualStudio templates. For more information about creating an MVC application, see Configuring your MVC Application topic.
Add a new Controller:
Default1Controller
).Add a View for the controller:
DefaultController
) to open it.Index()
.Index.cshtml
to open it.Index.cshtml
file with the code given below to initialize a Popup control.
HTML |
Copy Code
|
---|---|
@using C1.Web.Mvc; <link href="~/Content/css/bootstrap/css/bootstrap.css" rel="stylesheet" /> <style> .btn { height: auto; } .popover { display: block; } .tab-content > .tab-pane { display: block; } </style> <!-- The popup owners. --> <button id="btn3" type="button" class="btn btn-default"> Click to show Popup form <br> <small>(ShowTrigger=Click, HideTrigger=None)</small> </button> <c1-popup class="popover" id="popup3" owner="#btn3" hide-trigger="PopupTrigger.None"> <h3 class="popover-title"> Title </h3> <div class="popover-content "> <form name="popoverForm"> <p>Hello Popup<br>This is a multiline message!</p> <pre>2 + 3 = <span class="">5</span></pre> <div class="form-group"> <div class="input-group"> <div class="input-group-addon">@@</div> <input class="form-control" type="email" placeholder="Enter email"> </div> </div> <div class="form-actions"> <button type="button" class="btn btn-danger wj-hide">Close</button> <button type="button" class="btn btn-primary wj-hide">Save changes</button> </div> </form> </div> </c1-popup> |