0

在我的网页中,我可以用用户信息填写一些表格。

http://hotcont.eu/OnlineVertrag/EContract

填充后,如果所有内容都按我想要的方式填充,我可以再次看到它。现在应该发送给合作伙伴。

我的问题,我怎样才能读取这个页面的html页面源,里面有填充的用户信息?

我想将页面源作为字符串作为 HTML 正文与 MailMessage 一起发送。

<tr>
                    <td style="width: 400px;">
                        <b style="font-size: smaller; color: #00008B;">
                            <%= Html.DisplayFor(model => model.NameSeller) %></b>
                        <p style="margin-top: 3px; border-top: solid 1px #fddf99; width: 300px;">
                            Vorname, Nachname</p>
                    </td>
                    <td>
                        <b style="font-size: smaller; color: #00008B;">
                            <%= Html.DisplayFor(econtract => econtract.NameBuyer)%></b>
                        <p style="margin-top: 3px; border-top: solid 1px #fddf99; width: 308px;">
                            Vorname, Nachname</p>
                    </td>
                </tr>
4

1 回答 1

1

您可以查看以下帖子,该帖子说明了如何通过将您在提交表单后检索到的模型传递给字符串来将视图呈现为字符串。

如果您使用的是 MVC 3,您可以查看专为此目的设计的MvcMailer 。

于 2012-08-28T11:34:01.447 回答