asp.net I found that I could try to embed an IFRAME in the initial page, then use an IFRAME to display a page, and set the IFRAME to be in absolute position, Z-index set to the highest 9999, so that the page can be overwritten on the initial interface, When the modal window needs to be displayed, the IFRAME is displayed, and the IFRAME can be enlarged to cover the initial window or to cover the key items so as not to make any changes to the window behind it. The iframe display window needs to be closed as long as the IFRAME of its parent is hidden. The actual test found that the diaplay of the IFRAME can not be changed in the child window, so we also need to put the IFRAME in a Div, control the display of the Div can control the appearance of the window or hidden. But why not use Div directly to display the window, for two reasons: 1. The DIV cannot block the DropDownList control behind it, and the IFRAME can. 2. It is not easy to put the contents of the window into a separate Web page, the reusability is poor.
Here's the code, showing that the hide uses both client and server-side code:
Namespace WSGUI1
{
<summary>
Summary description of the WebForm2.
</summary>
public class WebForm2:System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load (object sender, System.EventArgs e)
{
Place user code here to initialize page
if (! IsPostBack)
{
BUTTON1.ATTRIBUTES.ADD ("onclick", "Hide ()");
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.