Dynamic page content - simple but hard...

C

Chris

Hello everyone,

I'm trying to do a very simple thing but am having completely no luck.

I have a number of articles on my website that I'm migrating into a database
table as html (just blog type pages). I have a page called viewer.aspx that
loads the html code from the database and displays it on the page. This
works fine.

My blogs contain links to other pages on my site and my site contains a
variety of folders so I use <%=ResolveUrl("~/some_folder/some_page.aspx")%>
to cleanly jump between pages.

Problem:

When I load the content it is placed into a span html control as text:

content_span.InnerHtml = myArticleHTML;

This means that the page looks fine but rather than seeing the hyperlink I
acutlaly see the text "<%=ResolveUrl("~/some_folder/some_page.aspx")%>" on
my page. How do I load the data from the database in a way that will make
asp convert the <%%> tags to the appropriate links?

Thank you in advance,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top