Question : Multiline Label control in ASP.net

Hi,
I have a Datagrid that I use for data entry in an ASP.net application. In edit mode , the datagrid columns have textboxes that the users use to enter the data. Some of the columns might have data on multiple lines. When the user accepts (clicks on Save in the datagrid row) , the information in the datagrid is dsiplayed in the Label controls. But the data on multiple lines in the textboxes is displayed in one line in the datagrid.
How do I make it appear on multiuple lines in a label control also??

Thanks

Answer : Multiline Label control in ASP.net

It will look something like this, in ItemDataBound

If e.Item.ItemType <> ListItemType.Header and e.item.ItemType <> ListITemType.Footer Then
  Dim lblProDesc as Label = e.Item.FindControl("lblProDesc")
  lblProDesc.Text = cstr(DataBinder.Eval(e.item.DataItem, "sProdDesc")).Replace(vbCrLf, "
End If
Random Solutions  
 
programming4us programming4us