有人用的XMLHTTP技术,无刷新提交,返回页面数据。 ------------------------ 无刷新是可以的,无法得到像DATAGRID般功能强大的表格,只能返回一般的表格形式. 下面给你一个XMLHTTP脚本函数. //以XML求取数据 //webFileUrl:要读取的页面地址,可带参数 function XmlPost(webFileUrl) { var result = ""; var xmlHttp = new ActiveXObject("MSXML2.XMLHTTP"); xmlHttp.open("POST", webFileUrl, false); xmlHttp.send(""); result = xmlHttp.responseText; return(result); }在webFileUrl页面,你可以 response.write(".."); response.end(); 方式直接返回值,也可以xml的形式返回值.
你根据你选择的值来判断DATAGRID拌定的数据内容吧。你可以把dropdownlist的autopostback属性设置为true后,然后在dropdownlist的selectedindexchanged事件中写相应代码,根据取到dropdownlist的值来对应datagrid相对数据
把dropdownlist的autopostback属性设置为true 这样会频繁的刷新页面,只要用户的选择改变了,
就会提交服务器刷新页面,这样做效率不是很高啊。有人用的XMLHTTP技术,无刷新提交,返回页面数据。
------------------------
无刷新是可以的,无法得到像DATAGRID般功能强大的表格,只能返回一般的表格形式.
下面给你一个XMLHTTP脚本函数.
//以XML求取数据
//webFileUrl:要读取的页面地址,可带参数
function XmlPost(webFileUrl)
{
var result = "";
var xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
xmlHttp.open("POST", webFileUrl, false);
xmlHttp.send("");
result = xmlHttp.responseText;
return(result);
}在webFileUrl页面,你可以
response.write("..");
response.end();
方式直接返回值,也可以xml的形式返回值.