gpt4 book ai didi

c# - 传值+上传文件

转载 作者:太空宇宙 更新时间:2023-11-03 13:42:55 25 4
gpt4 key购买 nike

我正在使用 asp.net c# 和 Telerik 工具。我的问题是,我想传递值

of (textbox, drop down list and file uploaded details) to another asp page using java script,但是没有任何效果,我想获取文件内容并将其传递给 ??你能给我一个解决方案吗?请!

第 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>";
}

最佳答案

尝试使用
var cityName = document.getElementById('<%= cityName.ClientID %>');而不是

var cityName = document.getElementById("cityName");

关于c# - 传值+上传文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16372307/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com