我在页面上上传了一个 ajaxtoolkit 文件
<ajax:HtmlEditorExtender runat="server" ID="htmEditor"
DisplaySourceTab="true" TargetControlID="txtWelcomenote"
OnImageUploadComplete="htmEdtior_OnUploadComplete">
后面的代码是
protected void htmEdtior_OnUploadComplete(object sender, AjaxFileUploadEventArgs e)
{
// Generate file path
string filePath = "~/Images/" + e.FileName;
// Save uploaded file to the file system
var ajaxFileUpload = (AjaxFileUpload)sender;
ajaxFileUpload.SaveAs(MapPath(filePath));
// Update client with saved image path
e.PostedUrl = Page.ResolveUrl(filePath);
}
我的问题是,当我尝试上传图像时,它没有上传,事件也没有触发。我也调试了我正在获取额外的查询字符串,例如contextkey={DA8BEDC8-B952-4d5d-8CC2-59FE922E2923} 可能是什么问题?解决方案是什么?请一些帮助我