I had Datalist which retrieve aportion of atext from database and this text must be format .as if there is (.) .it started in new line.
So how can I do that?
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<div class="scrollerDiv_open_about m10 ad_mun_font">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("Id","~/Handlers/AboutUsImage.ashx?Id={0}") %>'
Width="178" Height="115" Style="float: left; padding: 10px 10px 0 10px" />
<span class="ad_mun_font_h"><asp:Label
ID="LblHeader" runat="server" Text='<%# Eval("Header") %>'></asp:Label></span>
<p>
<asp:Label ID="LblText" runat="server" Text='<%# Eval("Text") %>'></asp:Label>.</p>
</div>
</ItemTemplate>
</asp:DataList>
Just use the Replace method, as follows:
Edit:
Given that you are binding to a datasource, it would be better to act directly on the datasource instead. For example:
I’m not with VS open, but I reckon this would work, so long as you are just using myDataSource to display stuff. If you were editing data in your grid or whatever, you might need to rethink this, but it should get you started.