0

I got HTML tags saved in column as :

<p><strong>Alva Beach Markets from 8.00am to 1.00pm.&#160; For more information contact Monika Chapple on 0428 649 472.</strong></p>

But when bind it to Label out is showing whole HTML tags instead the inner text.

How should i parse this before binding to label control.

Thanks

3
  • Do you want to parse it out or display it using that html? Commented Aug 19, 2009 at 2:46
  • Yes need to bind it label control. Commented Aug 19, 2009 at 2:47
  • So you need to show Alva Beach Markets from 8:00AM to 1:00PM and nothing else, no html, etc... in the label control? Or do you want to show the text with the HTML around it on the web page? Commented Aug 19, 2009 at 2:54

2 Answers 2

6

Use the literal control not a label. The label control ignores markup and spits out exactly what it is given as text. The literal will return the HTML.

Sign up to request clarification or add additional context in comments.

Comments

0

Weird, someone had replied with 'use a literal control', but their post is gone now. Anyway, what's what you should do.

-- Edit:

And now it's back again. Disregard me.

1 Comment

Don't feel crazy... I actually deleted it and then undeleted it just as fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.