如何在多行文本框中按Enter键添加标记 [英] How To Add Tag Where I Press Enter On Multiline Textbox
本文介绍了如何在多行文本框中按Enter键添加标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个多行文本框。我正在将文本框数据插入数据库。它工作正常,但是当我从数据库获取数据时没有换行符。实际上我想要的是插入换行符标签(),我按下按钮在多行文本框中输入..
解决方案
请参见不显示文本对此我输入在文本区相同的格式在股利或跨度标记 [ ^ ]
您应该有一个文本区域,如下例所示:
< ; textarea name = 评论 id = 注释 style = width:100%; rows = 5 cols = 20 >
在ASP.NET中,网页应该有下一个例子:
< asp:TextBox runat = server ID = 评论 EnableViewState = true width = 100% TextMode = MultiLine > < / asp:TextBox >
i have one multiline textbox. i am inserting textbox data into database. It is working fine, but when i get data from database there is no line breaks.. Actually what i want is insert linebreak tag () where i press enter in multiline textbox on click of the button..
解决方案
See Not Showing Text Which I Enter In Textarea In Same Format In Div Or Span Tag[^]
You should have a text area like in the next example:
<textarea name="Comments" id="Comments" style="width: 100%;" rows="5" cols="20">
In the ASP.NET the web page should have the next second example:
<asp:TextBox runat="server" ID="Comments" EnableViewState="true" width="100%" TextMode="MultiLine"></asp:TextBox>
这篇关于如何在多行文本框中按Enter键添加标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文