如省。然后我想将用户选择的参数,来提取数据。
解决方案 »
- Discuz!NT 2.5论坛问题,都进来看看。
- 下载文件的问题,文件的内容是下载的时候生成的 100分
- 关于文本框的焦点问题
- asp.net(C#) 访问Access的Date/Time型字段问题
- vs.net开发环境开发的WEBSERVICE上传到空间时的问题
- .net+win2000 server 客户端运行提示权限不够.(高分求解)
- 我的ASP.NET上传程序中上传文件大小为什么不能超过4M
- FreeTextBox ,当我改变FontFaceMenuList属性时候,总是出现解析错误。(这个属性是String[]类型)
- 为什么不能通过浏览器正常访问WORD文档?
- 除了excel有什么好用工具编辑csv
- repeater 动态添加行
- asp.net swfupload 大文件上传 超时问题
例:
主窗口<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModelDialogMain.aspx.cs"
Inherits="testWeb.ModelDialogMain" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label2" runat="server" Text=""></asp:Label><br />
<asp:Label ID="Label1" runat="server" Text="Condition"></asp:Label>
<asp:TextBox ID="txtCondition" runat="server"></asp:TextBox><br />
<asp:Button ID="btnShowCondition" runat="server" Text="ShowSelect" />
</div>
</form>
<script type="text/javascript">
// 打开选择子窗体
var result = window.showModalDialog("ModelDialogSub.aspx", "", "dialogWidth=" + 100 + "px;dialogHeight=" + 100 + "px;resizable:yes;")
// 返回值赋值给检索条件
var txtCond = document.getElementById("txtCondition");
txtCond.value = result;
</script>
</body>
</html>
子窗口<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModelDialogSub.aspx.cs"
Inherits="testWeb.ModelDialogSub" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript"> function btnSelect_onclick() {
// 获取选择的值
var selector = document.getElementById("conditionSelector").value;
// 将获取的值已window返回值的形式返回给主窗口
window.returnValue = selector;
// 关闭窗口
window.close(); } </script>
</head>
<body>
<form id="form1" runat="server">
<div>
<select id="conditionSelector">
<option value="1">1111 </option>
<option value="2">2222 </option>
<option value="3">3333 </option>
</select>
<br />
<input type="button" id="btnSelect" value="select" onclick="return btnSelect_onclick()" />
</div>
</form>
</body>
</html>