SoFunction
Updated on 2025-03-04

gridview forced line break

When I encountered this problem today, I checked the information online and solved it as follows:
protected void Page_Load(object sender, EventArgs e)
{
//Normal line break
    ("style", "word-break:keep-all;word-wrap:normal");
//The following line is automatically wrapped
    ("style", "word-break:break-all;word-wrap:break-word");
    if (!IsPostBack)
    {
bind();//Just call data binding
    }
}
It's better if defined in CSS^-^