remove inner html tag

Posted by Sushant under ASP.NET on 6/12/2013 | Points: 10 | Views : 1106 | Status : [Member] | Replies : 2
hi all
in my database i am saving content with innerhtml but at the time of reading data in label it is comming with html tag.
But i want inner html
ex:-in database
<a href="something"sushant></a>
here "sushant" shoud come with hyper link not with html tag
thanks

Sushat


Responses

Posted by: Sharjeet on: 6/12/2013 [Member] Starter | Points: 25

Up
0
Down
<a href="something" target='_blank'>sushant></a> Now it will show sushant with the link to something.

Buy Indian Facebook Likes

Sushant, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 6/14/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Dear Syshat,

You can use the Literal control instead of label control.
.aspx file
<asp:Literal ID="Literal1" runat="server" />
.aspx.cs file
Literal1.Text = "<a href="something">sushant</a>"; //You can use the data set to bind the values to literal from database.

Hope this will solve you problem.

Sushant, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response