我一直在研究如何从 asp.net 导出到 word 的教程和其他问题,但我发现大多数都是处理一个简单的 html 表,这不是我需要的或涉及昂贵的扩展。
我有一个用户填写并提交的网络表单。提交后,我想让他们选择将其导出到 Word(见屏幕截图)。
我已经尝试右键单击并另存为测试,看看它是如何出现的,它一点也不整洁(见截图)。
当我打印预览时,由于汉堡侧栏(见截图),页面也是一团糟,这两个问题有关系吗?
关于让 doc 看起来与网页相似的任何提示?
我的代码示例:
<!--Section 4 - Health & Safety-->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseFour">Health & Safety</a>
</h3>
</div>
<div id="collapseFour" class="panel-collapse collapse in">
<div class="panel-body">
<p>Have their been any changes to Health and Safety issues since the last assessment?</p>
<label class="radio-inline">
<span class="checkableBox checkableBox-radio">
<asp:RadioButton class="validate[required]" ID="rbtnHealthYes" runat="server" value="Y" Text="Yes" GroupName="HealthAndSafetyChanges" />
</span>
</label>
<label class="radio-inline">
<span class="checkableBox checkableBox-radio">
<asp:RadioButton class="validate[required]" ID="rbtnHealthNo" runat="server" value="N" Text="No" GroupName="HealthAndSafetyChanges" />
</span>
</label>
<br /><br />
<p><i>If the answer to the above is yes, please give more details below and complete a new Health and Safety Assessment.</i></p>
<asp:TextBox class="form-control input-sm auto-size m-b-10" ID="txtHealthDetails" runat="server" TextMode="MultiLine"
placeholder="This could include things such as new renovations to the house or measures which have since broken. (This text box will grow as you fill it)"></asp:TextBox>
<hr class="whiter m-t-20" />
<br />
<br />
<p>Additional Comments:</p>
<asp:TextBox class="form-control input-sm auto-size m-b-10" ID="txtHealthComments" runat="server" TextMode="MultiLine"
placeholder="(This text box will grow as you fill it)"></asp:TextBox>
</div>
<!--Body End -->
</div>
<!--Collapse 4 End -->
</div>
<!--Section 4 End -->
http://joshcoopster.tumblr.com/image/131738484325