📄 showuser.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowUser.aspx.cs" Inherits="ShowUser" %>
<!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">
<base target="_self"/>
<meta http-equiv="Expires" content="0" >
<meta http-equiv="Cache-Control" content="no-cache" >
<meta http-equiv="Pragma" content="no-cache" >
<title>无标题页</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<script language="JavaScript">
function getValue() {
window.dialogArguments.value=document.all("ListBox1").value;
window.close();
//window.dialogArguments=document.all("ListBox1").value;
//alert(sData);
// window.close();
}
</script>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="Dep_Name" DataValueField="Dep_Name" Width="91px" AutoPostBack="True">
</asp:DropDownList> <br />
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="Emp_Name"
DataValueField="Emp_Name" Height="82px" Width="91px" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged"></asp:ListBox>
<br />
<input id="btnSelect" type="button" value="选 择" onclick="getValue()" style="width: 91px; height: 23px" />
<br />
<asp:SqlDataSource
ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:conString %>"
SelectCommand="SELECT [Emp_Name] FROM [Employee] WHERE ([Dep_Name] = @Dep_Name) ORDER BY [Emp_Right] DESC">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="Dep_Name" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:conString %>"
SelectCommand="SELECT [Dep_Name] FROM [Department]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -