Home > DeveloperSection > Forums > Disabling HTMLencode in ASP.NET and C#
Chintoo Semi

Total Post:135

Posted on    November-13-2014 10:37 PM

 ASP.Net C#  Gridview 

 1 Reply(s)
 1065  View(s)
Rate this:

I am using DataTable to populate data in GridView in ASP.NET I am trying to place a line break in a cell inside the DataGrid View I used


to place a line break.I am manipulating this data from C# which is being generated dynamically.Because of HTML encoding 
is replaced as


So please tell me how to disable that html encoding if possible for that gridView.

john rob

Total Post:108

Posted on    November-14-2014 1:58 AM

TemplateField allows you to add html inside a cell, as

<asp:GridView ID="gv" runat="server" AutogenerateColumns = "false">


    <asp:BoundField DataField="col_name" HeaderText="Header"/>










Don't want to miss updates? Please click the below button!

Follow MindStick