当前位置:网站首页>Double insurance for line breaking
Double insurance for line breaking
2022-07-27 19:06:00 【Microservice preacher】
stay ASP.NET in , Extract the data from the database and display it on the page , It's usually used < asp:Lable />, Or use it directly <% # %> To show , Chinese characters generally do not have the problem of line breaking , english , Or continuous punctuation , There will be no automatic line feed , Broke the web page , Here you are 2 A solution :
(1) stay <td /> with <% # %> To display data :
<td style="word-break:break-all;word-wrap: break-word"><% # %></td>
(2) Before submitting data to the database , Replace the newline symbol with <br>:
chr=chr.Replace("/n","<br>");
(3)<td style="word-break:break-all;word-wrap: break-word" width="600" align="left" bgcolor="#FFFFFF">
<p><span class="css"> Content :<br>
--------<%=rs("content")%></span></p>
<div align="center"> </div>
<div align="right"><span class="css"> Time of publication :<%=rs("time")%> </span></div></td>
</tr>
边栏推荐
猜你喜欢

Sentinel1.8.4 persistent Nacos configuration

Unity学习笔记(刚体-物理-碰撞器-触发器)

The understanding of string in C.

Leetcode first day of question brushing

CMD 命令

进行接口测试时,连接数据库,对数据源进行备份、还原、验证操作

Interviewer: what do you think is your biggest weakness?

Electric heating neck pillow chip-dltap703sc

JDBC MySQL 01 JDBC operation MySQL (add, delete, modify and query)

「测试新手百科」5 分钟快速上手Pytest 自动化测试框架
随机推荐
LeetCode 刷题 第一天
v-if,v-else,v-for
C#与Mysql数据库交互-Mysql配置及增删查改操作
The understanding of string in C.
Leetcode first day of question brushing
Nodejs template engine EJS
Useful resources for ns2
电磁场学习笔记-矢量分析和场论基础
JMeter interface automation - how to solve the content type conflict of request headers
I'm stupid. When completable future is used with openfegin, it even reports an error
Nacos基本概念和单机部署
MySQL 02 初体验
PHP字符串操作
Full automatic breast pump chip dltap703sd
Interviewer: what do you think is your biggest weakness?
MySQL 05 stored procedure
Kinect for unity3d - backgroundremovaldemo learning
Code interview of Amazon
ES6-新增方法
Using functions to extract numbers from text strings in Excel