Asp.net 在HTML文件中显示图像时出错

Asp.net 在HTML文件中显示图像时出错,asp.net,asp.net-mvc,ckeditor,Asp.net,Asp.net Mvc,Ckeditor,在我的MVC2应用程序中,我使用CKEditor,允许用户创建PDF文档。 首先,CKEditor内容将转换为HTML文件,然后转换为PDF文档。 我已经提供了一个按钮,称为箭头点击它的箭头图像应该得到插入。在编辑器中,图像成功显示,但在HTML和PDF文件中,图像未显示在显示alt内容的位置 箭头按钮的代码: <input type="button" class="green_button" id="arrow" name="Arrow" value="Arrow" style="wid

在我的MVC2应用程序中,我使用CKEditor,允许用户创建PDF文档。 首先,CKEditor内容将转换为HTML文件,然后转换为PDF文档。 我已经提供了一个按钮,称为箭头点击它的箭头图像应该得到插入。在编辑器中,图像成功显示,但在HTML和PDF文件中,图像未显示在显示alt内容的位置

箭头按钮的代码:

<input type="button" class="green_button" id="arrow" name="Arrow" value="Arrow" style="width: 110px; height: 30px; background-color: #FFFFFF;" onclick="return arrow_onclick()" />

function arrow_onclick() {
    var editor = CKEDITOR.instances.message;
    editor.insertHtml(' <input type="image" alt="arrow" src="../../PDFimages/arrow-left-up.jpg" style="height:100px; width:100px" />');
}

在提交表单之前,您应该从CkEditor设置textarea值,并使您的操作接受应用此批注的帖子
[HttpPost,ValidateInput(false)]

并检查您的src值。也许应该使用:

src="@(Url.Content( "~/PDFimages/arrow-left-up.jpg" ))" 
如果
PDFimages
文件夹包含在
Project/Content

$("#content").val(CKEDITOR.instances.message.getData());
src="@(Url.Content( "~/PDFimages/arrow-left-up.jpg" ))"