我使用的是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