如何将网页中的数据插入到html表中 [英] how to insert data from a web page to html table

查看:82
本文介绍了如何将网页中的数据插入到html表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,

i想要插入我在html表中输入的数据。

i创建了一个.htm页面和一个表格,但是没有插入值它。这些值被插入到表格下方。





i在visual studio 2008中编写了代码,但现在它在Visual Studio 2010中无效。



objwriter.WriteLine(/ tr>);

+ txtname.Text + + txtemail.Text +

hey,
i want to insert the data which i input in an html table.
i have made a .htm page and a table, but values are not inserted in it. the values are inserted below the table.


i wrote dis code in visual studio 2008 but now it is not working in visual studio 2010.

objwriter.WriteLine( "/tr>");

" + txtname.Text + "" + txtemail.Text + "

推荐答案

dis不是一个单词。您的代码很难放置,脱离上下文,但在ASP.NET中,您永远不应该发出这样的表,这是一种浪费。如果要完全控制数据的发送方式,请使用转发器。
dis is not a word. Your code is hard to place, taken out of context, but in ASP.NET, you should never emit tables like this, it''s a waste. Use a repeater if you want full control over how data is emitted.


不应用表的结束标记。


hi,



使用这样的表结构





Use table structure like this

StringBuilder sb=new StringBuilder();
sb.append("<table><tr><td>");
sb.append("txtemail.Text");
sb.append("</td></tr></table>");





然后用writer写这个字符串。



Then use writer to write this string.


这篇关于如何将网页中的数据插入到html表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆