在DNN 9.6上,尝试运行自定义webform模块(最初在DNN 4.5上构建)我正在尝试上传文件
当第一次导航到页面时,上传结果总是在header/request body中包含postedfile = null,Content-Type: application/x-www-form-urlencoded;charset=UTF-8我可以在请求__ASYNCPOST: true中看到
如果尝试第二次上传,它将与标题/请求内容类型: multipart/form-data;boundary=----WebKitFormBoundaryfzAkNd7yEs3BGnG8一起工作
如何在DNN中第一时间实现完全回发
<table id="tblUpload" runat="server" cellspacing="0" cellpadding="0">
<tr><td valign="bottom">
<dnn:label id="plPhoto" runat="server" suffix=":" controlname="lnkPreview"></dnn:label>
</td>
<td valign="top">
<input id="filePhoto" type="file" size="50" name="File1" runat="server" />
</td>
</tr>
<tr>
<td valign="bottom"><dnn:label id="plSaveAsFile" runat="server" suffix=":" controlname="txtFileName"></dnn:label></td>
<td>
<asp:textbox id="txtTitle" runat="server" Width="200px" MaxLength="200"></asp:textbox>
<asp:linkbutton CssClass="CommandButton" id="cmdUpload" runat="server" borderstyle="none" text="Upload" resourcekey="cmdUpload"></asp:linkbutton>
<asp:linkbutton class="CommandButton" id="cmdCancel2" runat="server" borderstyle="none" text="Cancel"
resourcekey="cmdCancel" causesvalidation="False"></asp:linkbutton>
</td>
</tr>
</table>发布于 2020-08-05 09:31:09
在你的控制清单中,你会有类似这样的东西。
<supportsPartialRendering>true</supportsPartialRendering>将此值更改为"false“是最快也是最可靠的方法,可以确保这不是通过异步post完成的。有更高级的方法,但这是最简单的。
https://stackoverflow.com/questions/63249423
复制相似问题