我使用的是asp.net c#和Telerik工具。我的问题是,我打算通过使用java脚本将(文本框,下拉列表和文件上传的详细信息)的值传递值+上传文件
传递到另一个asp页面,但没有任何工作,我想获取文件内容并将其作为好 ??你能给我一个解决方案吗?请!
在第1页:
<script type="text/javascript">
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function populateCityName(arg) {
var cityName = document.getElementById("cityName");
cityName.value = arg;
}
function returnToParent() {
//create the argument that will be returned to the parent page
var oArg = new Object();
//get the city's name
oArg.cityName = document.getElementById("cityName").value;
//get a reference to the current RadWindow
var oWnd = GetRadWindow();
//Close the RadWindow and send the argument to the parent page
if (oArg.cityName) {
oWnd.close(oArg);
}
else {
alert("Please fill field");
}
}
</script>
第2页:
function OnClientClose(oWnd, args) {
//get the transferred arguments
var arg = args.get_argument();
if (arg) {
var cityName = arg.cityName;
$get("order").innerHTML = "You chose to fly to <strong>" + cityName + "</strong>";
}
什么都不行?你有什么尝试? – Sayse 2013-05-04 08:38:53
首先,我尝试通过如下所示的文本框值,但我faild var cityName = document.getElementById(“cityName”); cityName.value = arg; – user2349354 2013-05-04 08:40:54
另外我试图获取文件内容作为字符串来保存它的数据库,但我不知道该怎么做? – user2349354 2013-05-04 08:44:05