页面ClassQuery.aspx (
传值)
DataTable dt = teacherBll.GetTeacherByWhere(" bmbh like '%" + this.ddlstCollege.SelectedValue + "%'");
ListBox1.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
string text = dr["jsxm"].ToString();
string value = dr["id"].ToString() + "|" + dr["jsgh"].ToString() + "|" + dr["bmbh"].ToString();
ListItem item = new ListItem(text, value);
this.ListBox1.Items.Add(item);
}
-------------------------
function btnSave()
{
var listbox2=$ get('<%= ListBox2.ClientID %>');
var v=null;
if(listbox2.length>0)
{
v=new Array();
for(var i=0;i<listbox2.length;i++)
{
var p=new Entity();
p.Name=listbox2.options.text;
p.Number=listbox2.options.value;
v.push(p);
}
}
window.close();
window.returnValue= v;// 把v值传给另一个页面 }
--------------------------
页面StuGraduationRegulationAdd.aspx(接受值)
function QueryZKJS(res)
{
var txtZkjsgh=document.getElementById("txtZkjsgh");
var txtZkjsxm=document.getElementById("txtZkjsxm");
var temp=res[0].Number;
var t=temp.split("|");//分割值
txtZkjsxm.value=res[0].Name;
txtZkjsgh.value=t[1];
}
DataTable dt = teacherBll.GetTeacherByWhere(" bmbh like '%" + this.ddlstCollege.SelectedValue + "%'");
ListBox1.Items.Clear();
foreach (DataRow dr in dt.Rows)
{
string text = dr["jsxm"].ToString();
string value = dr["id"].ToString() + "|" + dr["jsgh"].ToString() + "|" + dr["bmbh"].ToString();
ListItem item = new ListItem(text, value);
this.ListBox1.Items.Add(item);
}
-------------------------
function btnSave()
{
var listbox2=$ get('<%= ListBox2.ClientID %>');
var v=null;
if(listbox2.length>0)
{
v=new Array();
for(var i=0;i<listbox2.length;i++)
{
var p=new Entity();
p.Name=listbox2.options.text;
p.Number=listbox2.options.value;
v.push(p);
}
}
window.close();
window.returnValue= v;// 把v值传给另一个页面 }
--------------------------
页面StuGraduationRegulationAdd.aspx(接受值)
function QueryZKJS(res)
{
var txtZkjsgh=document.getElementById("txtZkjsgh");
var txtZkjsxm=document.getElementById("txtZkjsxm");
var temp=res[0].Number;
var t=temp.split("|");//分割值
txtZkjsxm.value=res[0].Name;
txtZkjsgh.value=t[1];
}