0
ハンドラのレスポンスとしてファイル名を追加していますが、JavaScriptでハンドラに追加した値を取得しようとしています隠しフィールド。ただし、隠しフィールドの値は常にnullです。私は応答に追加するファイル名を取得していません。どのように私は、ハンドラハンドラの値をレスポンスとしてaspxページに渡す方法
public class Upload : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest (HttpContext context)
{
context.Response.Write(filename);
context.Response.StatusCode = 200;
}
}
<script type="text/javascript">
$(document).ready(function() {
$("#<%=AFU_Video.ClientID%>").uploadify({
'uploader': 'scripts/uploadify.swf',
'script': 'Upload.ashx',
'buttonText': 'Video',
'cancelImg': 'images/cancel.png',
'folder': 'D:\Media',
'fileExt': '*.mp4',
'fileDesc': 'Video Files (.mp4 Only)',
'multi': true,
'auto': true,
'onComplete': function (event, ID, fileObj, response, data) {
document.getElementById("<%= Hidd_VideoLoc.ClientID %>").value = response.filename;