Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
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:
Summary description of the WebForm2.
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 ()");
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.