发送uploadify提交/发布到aspx代码后面的方法而不是处理程序和关闭jQuery模式窗体
我们正在使用Telerik的Sitefinity社区版,我们一直在用它来部署处理程序和Web服务。因此,我想知道当使用Uploadify而不是脚本选项标题到ashx时,我们可以将它发布到可以处理上传的服务器端方法吗?如果是这样,有人会非常友好并发布一个快速而肮脏的例子让我开始吗?
这引出了另一个问题。在这个特定的页面上,我们使用的jQuery.FormWizard与服务器端表单不兼容。在上传文件时,我们要做的是打开一个模态表单,让用户在完成后上传文件,我们只需关闭它们的模态表单。但这不起作用,我很确定它,因为我没有正确处理OnComplete / OnAllComplete。请问如何做到这一点?
这是js文件中的uploadify:
$("#VisaHelpNeeded").click(function() {
//This opens the modal form
$dialog.dialog('open');
//********** Uploadify stuff here ********************
$('#fileInput').uploadify({
'uploader': '../../App_Themes/ApRegistration/images/uploadify.swf',
'script': 'WebForm1.aspx/Register',
'scriptData': { 'society': $('#nationalSociety').val(), 'participant': $('participantName').val() },
'cancelImg': '../../App_Themes/ApRegistration/images/cancel.png',
'auto': true,
'multi': true,
'fileDesc': 'Image Files',
'fileExt': '*.jpg;*.png;*.gif;*.jpeg;*.bmp',
'sizeLimit': 4000000,
onAllComplete: function(){$('#dialog-form').dialog('close');}
});
});
这是模态形式
var $dialog = $('<div></div>')
.html('<label>Please attach a scanned copy of your passport</label><input id="fileInput" name="fileInput" type="file" />')
.dialog({
autoOpen: false,
height: 350,
width: 485,
modal: true,
buttons: {
Cancel: function() {
$(this).dialog('close');
}
}
});
这里是方法调用的尝试签名,用于将其保存在后面的代码上(我在研究这个方法的同时读取该方法应该是一个静态的Web方法,但我现在找不到链接,抱歉)
[WebMethod(true)]
public static void Register(HttpContext context)
{
//do lots of cool code here
}
非常感谢/
没有找到相关结果
已邀请:
2 个回复
玩翁文醚碱
弓萍功