使用 Html Agility Pack 将 .NET 服务器控件插入 DIV
我选择了这样的 DIV:
var divEl = doc.DocumentNode.SelectSingleNode("//div[@id='" + field.Id + "']");
此 DIV 是空的。现在我需要向该 DIV 添加一个 .NET TextBox 服务器控件,然后将该 DIV 发送回客户端。如何?
I selected a DIVlike this:
var divEl = doc.DocumentNode.SelectSingleNode("//div[@id='" + field.Id + "']");
This DIV is empty. Now I need to add a .NET TextBox server control to this DIV and then send the DIV back to the client. How?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您需要创建一个表示文本框的元素,将文本框作为子元素添加到 div 中,并将文档保存到您向客户端打开的任何流中。
First you need to create an element representing the textbox, add the textbox as a child to the div and save the document to whatever stream you have open to the client.