The mode window is a convenient way to expand the current page, but the ASPX file can only be called in this way as iframe of the HTM file. At the same time, the request string is also a way to make a convenient and commonly used page to pass the value. So how to make the two together is to realize how to use the request string to pass the value to the ASPX page opened by the mode window?
We can use JS script to implement this function:
1. Call the page code:
<script language = "javascript">
Function getCorrelativeID ()
{{
rdl = document.GetelementsByname ("RDLSYSTEM");
input = document.GetelementByid ("TXTCORRELELATIVEM");
sysid = "";
for (i = 0; I <rdl.length; i ++)
{{
if (rdl [i] .tagname == "input")
{{
if (rdl [i] .Checked)
{{
sysid = rdl [i]. Value;
}
}
}
ARG = Window.showmodalDialog ("Searchitemc.htm? Sysid ="+Sysid, Window, "Resizable: 1;");;);;);;);;);
if (ARG! = NULL)
{{
input.Value = Arg;
}
}
</script>
2. The code of the htm file (searchitemc.htm):
<html>
<head>
<script language = "javascript">
Function resolveurs ()
{{
var FRM = Window.frames [0];
fRM.Location = location.tostring (). Replace ("C.HTM", "C.ASPX");
}
</script>
</head>
<body>
<Table Align = "LEFT" Cellpadding = "0" Cellspacing = "0" ID = "Table1">
<tr>
<td value = "top"> <iframe id = "ifmain"> </iframe> </td>
</tr>
</table>
</body>
</html>
3.ASPX file (Searchitemc.aspx) code:
request.querystring ["sysid"]. trim ();