Link to home
Start Free TrialLog in
Avatar of chrisryhal
chrisryhal

asked on

Filling with HTML

I have Pure HTML stored in tables in SQL.  I already know how to perform a SQL Connection and such, but what control on an ASP.NET page using VB.NET will convert the HTML, into something a user can read?  For example, can I use a textbox, or a picture box, or what?

So.....If the html were something simple like:  <b>Hello World</b>  then how to display that on a ASP.NET page, and make it display to the user a BOLD "Hello World"
ASKER CERTIFIED SOLUTION
Avatar of softplus
softplus

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chrisryhal
chrisryhal

ASKER

Ok, I am going to try all the options, but maybe if you could help get me past this really quick.  I am not understanding why I get an error on:

        myCommand.SelectCommand.Parameters.Add(New SqlParameter("@Id", SqlDbType.NVarChar, 11))
        myCommand.SelectCommand.Parameters("@Id").Value = Request.QueryString("id")

Saying, that "SelectCommand" is not a member of Imports System.Data.SqlClient.  I have the namespace declared

Here is the code:


        Dim DS As DataSet
        Dim MyConnection As SqlConnection
        MyConnection = New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("MAXASPCONNECTION"))

        'Dim MyCommand As SqlDataAdapter

        Dim SelectCmd As String = "SELECT HTML " _
                         & "FROM Benchmarking " _
                         & "WHERE ID = @ID"

             Dim myConn As New SqlConnection(SelectCmd)
        Dim myCommand As New SqlCommand(SelectCmd, myConn)

        myCommand.SelectCommand.Parameters.Add(New SqlParameter("@Id", SqlDbType.NVarChar, 11))
        myCommand.SelectCommand.Parameters("@Id").Value = Request.QueryString("id")

        myConn.Open()

        Dim dr As SqlDataReader
        dr = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

        If dr.Read = True Then
            Literal1.Text = dr("HTML") & ""
        End If

        dr.Close()
        myConn.Open()
        myCommand.Dispose()
        myConn.Close()
To explain further, the URL is:  "Benchmarking_details.aspx?id=1"