| |

VerySource

 Forgot password?
 Register
Search
View: 2087|Reply: 18

The format of the label when displaying news content is ugly, how to solve it?

[Copy link]

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-9-25 16:30:01
| Show all posts |Read mode
Now I am working on a news page, and I have encountered a problem!
In news.aspx, pass the ID of the corresponding news title to the next page newsDetails.aspx, and use a Label in newsDetails.aspx to read the content of the corresponding news from the database and display it, but the problem is in newsDetails The format of the .aspx label when displaying news content is ugly. It’s not what I want at all. Any expert can help. It’s okay to not use Label, but arrange it in my own format! ?
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-9-25 17:45:01
| Show all posts
Isn't it possible to set various formats for Label? The font, size, color, etc. are all fine.
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-25 19:15:01
| Show all posts
The news you input is a textbox and then stored in the database. Use label to read it out. You can read the data in the database and replace the special characters, such as spaces, carriage returns, and then display it.
Reply

Use magic Report

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-25 20:45:01
| Show all posts
The news you input is a textbox and then stored in the database. Use label to read it out. You can read the data in the database and replace the special characters, such as spaces, carriage returns, and then display it.
-------------------------------------------------- --------
I entered the data directly in the database, such as:

Xinhua News: The Sri Lankan military said on the 5th that a bus explosion occurred near the Sri Lankan capital of Colombo that day, killing at least 5 people and injuring 15 others.

But it shows:

Xinhuanet News:
Sri Lankan Military
On the 5th, Sri Lanka
Near Colombo
Happened on the same day
Bus explosion
Incident, causing to
5 fewer people were killed,
Fifteen people were injured.
Reply

Use magic Report

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-25 21:00:01
| Show all posts
What's more, how do ordinary people enter content when they enter the news interface? Use TextBox? Or input directly in the database, but I find it difficult to control the format
Reply

Use magic Report

1

Threads

60

Posts

37.00

Credits

Newbie

Rank: 1

Credits
37.00

 China

Post time: 2020-9-25 21:30:02
| Show all posts
Online web editor FCKeditor
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 Mexico

Post time: 2020-9-25 22:00:01
| Show all posts
Don’t just save the information in the database. Save the HTML and see the effect.
For example, save <font size=3>ssss</font>,
And how to save HTML, I said upstairs, using a web editor, there are many kinds of online
Reply

Use magic Report

0

Threads

12

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-9-25 22:15:01
| Show all posts
The main reason is that the data in your database is not saved in your text format!
It is recommended to use a rich text editor!!!!!!!!!!
Reply

Use magic Report

0

Threads

12

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-9-25 22:30:01
| Show all posts
FCKEditor
FreeTextBox
...
Reply

Use magic Report

1

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-9-25 23:15:01
| Show all posts
I didn't expect so many masters at so late, I will try it first!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list