1, mainpage.aspx Click the button to take advantage of layer popup, the code is as follows:
<%@ page language= "C #" autoeventwireup= "true" codebehind= "MainPage.aspx.cs" inherits= "demo. MainPage "%><! DOCTYPE html>protected void Page_Load (object sender, EventArgs e) { if (!string. IsNullOrEmpty (request.querystring["Formsubmit")) { this.divMsg.InnerHtml = "Unit code:" + Hidselectunit.value + "</br> Comparison Date:" + hidCompareDate.Value.Split (', ') [0] + "|" + hidCompareDate.Value.Split (', ') [1] + "</br> Contrast tip: "+ hidCompareTips.Value.Split (', ') [0] +" | "+ hidCompareTips.Value.Split (', ') [1]; }}
Key code:
Layer.open ({
Title: [' Advanced query '],
Type:2,
Content: "Subpage.aspx?" Unitcode= "+ Unitcode,
Area: [' 500px ', ' 520px '],
shade:0.3,
BTN: [' OK ', ' close '],
Yes:function (index) {
var res =window["Layui-layer-iframe" + index].savefunc ();
if (res! = False) {
$ ("#hidSelectUnit"). Val (Res. Selectunit);
$ ("#hidCompareDate"). Val (res.comparedate);
$ ("#hidCompareTips"). Val (res.comparetips);
$ ("#form1"). Submit ();
}
}
});
2, Subpage.aspx is the pop-up box content area, the code is as follows:
<%@ page language= "C #" autoeventwireup= "true" codebehind= "SubPage.aspx.cs" inherits= "demo. Subpage "%><! DOCTYPE html>
3, the effect as shown:Identify and accept the popup input information and other information, as shown in:
Get layer Popup return value in ASP.