c#.Net remove html?

Associate
Joined
17 Mar 2008
Posts
135
Having a stupid day,

got a label:

<asp:Label ID="Label2" runat="server" Text='<%# Eval("Address") %>'></asp:Label>

It's pulling data from a database, which is fine. Only I need to be able to strip any HTML from it.

Not having much luck, any help appreciated.
 
Thanks for that.

Was hoping there might be a built in function similar to php with options like 'str_replace()' etc.

Guess I'm going to have to go the scripting route to do this. Thanks for the heads up on the site.
 
That 4guys from rolla site is very good resource for .net stuff. I wsa thinking along the same lines as yourself as string_replace in php or the functions to escape html chars but there doesn't seem to be anything. Not very experienced in .net myself so I wouldn't really know.
 
Cheers for the replies guys.

I'll keep searching to see if I can find a similar function to PHP, if so i'll post back here.
 
Back
Top Bottom