Displaying saved database content

  •  10-29-2009, 8:23 AM

    Displaying saved database content

    I can save my Editor content to the database but having trouble displaying/rendering the content back out on a page when I pull it back out of my MSSQL database.
     
    Have a table called 'CMS_PAGES and I'm saving the editor output into a field called 'pages_body'. This is the HTML data contained in that field for example:
      
      <div><img alt="" src="http://cutesoft.net/uploads/CLC Logo 1.gif" width="125" height="99" /></div><div>This is an image! <br /></div>
     
    Here is my VB.NET code for grabbing that data from the table and storing it into a variable:
          NOTE: The '1' represents the page_id I'm passing into my function
     
          strPageContent = pageContentAdapter.GetPageContent("1").ToString
     
    On the output end, I've tried just displaying the variable on a page '<%# strPageContent %>', tried sticking it in a label 'Label.Text = strPageContent', etc...and nothing is outputing the value from the table. All I get is an output of the table name, 'CMS_PAGES' on my output page. Any suggestions???
     
    Thanks
View Complete Thread