c# - Remove Line Break or Carriage Return -
i have in database values like:
hd1_des |hd1_has |hd -----------|-----------|---------- 25023132-1 |24974875-3 |25045370-0 24826798-6 |24829389-12|25045328-0
but when retrieve them datagridview, have this:
hd1_des |hd1_has |hd -----------|-----------|---------- 25023132- |24974875- |25045370- 1 |3 |0 24826798- |24829389- |25045328- 6 |12 |0
for retrieve use templatefields in gridview.
in label control, i've tried fix using:
htmlencode="false"
i tried replace using: text='<%# ((string)eval("id1des")).replace("\n", "") %>
in sp in sql tried:
select replace(replace([id1_desde], char(13), ' '), char(10), ' ') 'id1d'.
and in code using datareader tried:
saclote.id1desde = dr["id1d"].tostring().replace("\n", "<br />");
but still not results.
this more caused narrow column. make wider, can accommodate values needed.
Comments
Post a Comment