HTML file from database to user interface
I have a html document in a sql server table with tags and elements. I need
to read it from table field and show it in a web page. Is there any
component that I can use to show this html file in the browsed with
interpreting the html tags.Couldn't you just select the rows from the data and write out each raw line
with response.write(<data> )?
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:10BCEEB4-E71E-43B2-849B-19E71953C348@.microsoft.com...
> HTML file from database to user interface
> I have a html document in a sql server table with tags and elements. I
> need
> to read it from table field and show it in a web page. Is there any
> component that I can use to show this html file in the browsed with
> interpreting the html tags.
>
This page has other components and I need to show this html in the middle
section, I probably need a component that does that.
"bill" wrote:
> Couldn't you just select the rows from the data and write out each raw lin
e
> with response.write(<data> )?
> "JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
> news:10BCEEB4-E71E-43B2-849B-19E71953C348@.microsoft.com...
>
>
You could put this in a literal control making this html fragment appears at
the exact location you want...
Patrice
"JIM.H." <JIMH@.discussions.microsoft.com> a crit dans le message de news:
AF276C5B-8F44-4D1E-B124-33AA23223736@.microsoft.com...
> This page has other components and I need to show this html in the middle
> section, I probably need a component that does that.
> "bill" wrote:
>
I am quite new, can you give me an example pelase?
"Patrice" wrote:
> You could put this in a literal control making this html fragment appears
at
> the exact location you want...
> --
> Patrice
> "JIM.H." <JIMH@.discussions.microsoft.com> a écrit dans le message de news
:
> AF276C5B-8F44-4D1E-B124-33AA23223736@.microsoft.com...
>
>
An example of which part? You just select the data from the database, loop
through the result set, and for each loop you simply put
"response.write(<yourdata> )"...
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:56642F77-1368-4BFE-82E9-17E35DAD1473@.microsoft.com...
>I am quite new, can you give me an example pelase?
> "Patrice" wrote:
>
Here is some sample/psuedo code. This should give you a good idea of
how to implement this.
<%@. Control ClassName="DataBaseHtmlLiteral" %>
<script runat="server">
Public DataBaseID as integer
Sub OnPreRender
' create sql connection and command
SqlCmd = "Select TOP 1 [Table].[html] from [Table] WHERE [Table].
[IDField] = @.ID"
SqlCmd.Parameters.add("@.ID",DatabaseID)
HTML.Text = DirectCast(SqlCmd.ExecuteScalar(),String)
' clean up (close connection etc.)
End Sub
</script>
<asp:Literal ID="HTML" runat="server" />
Each instance requires the DataBaseID to be set.
This assumes a single instance of the html, if you are looping through
the table, do not use this. Don't want
Also, error catching is needed (row doesn't exist, column is null,
DataBaseID is null, etc)
Hope this helps!
I guess you meant Literal?
JIM. H. wrote:
> HTML file from database to user interface
> I have a html document in a sql server table with tags and elements. I ne
ed
> to read it from table field and show it in a web page. Is there any
> component that I can use to show this html file in the browsed with
> interpreting the html tags.
Showing posts with label document. Show all posts
Showing posts with label document. Show all posts
Monday, March 26, 2012
Saturday, March 24, 2012
HTML DOM Document?
In VB6 I use the DOMDocument (a component) to access the various parts of a HTML webpage like looping through all the <tables>, <a> and <img> and extract the infomation I need.
Is there a DOMDocument object available in ASP.net? Object like HTMLTable, HTMLAnchor, HTMLIMG.
Thanks in advance.
HTML document in aspx page
Hi friends,
I am using .NET 1.1 and write my code in VB. I want to place a HTML or XML document in an aspx page using a frame or a component like that which will let the user go up and down with scroll bars.
Thanks in advance
Regards...You could use an iFrame (http://www.w3schools.com/tags/tag_iframe.asp)
Firstly,
Thank you for your quick response. But i have a strange problem. I added an iframe to my aspx page. It looks very nice. The problem is when i click on "view in browser" it works but F5 does not. I could not solve the problem. (i write my code in vb.net 2003)
thanks for your time.
Regards...
More detail would be good, in what way doesn't it work?
When i press F5 to run the app, i can see iframe on page but there is no data in it. It is blank.
Show your iframe code, and however you are assigning its src attribute.
Hi friends,
Thanks for your time and support. It works fine.
Regards...
I am using .NET 1.1 and write my code in VB. I want to place a HTML or XML document in an aspx page using a frame or a component like that which will let the user go up and down with scroll bars.
Thanks in advance
Regards...You could use an iFrame (http://www.w3schools.com/tags/tag_iframe.asp)
Firstly,
Thank you for your quick response. But i have a strange problem. I added an iframe to my aspx page. It looks very nice. The problem is when i click on "view in browser" it works but F5 does not. I could not solve the problem. (i write my code in vb.net 2003)
thanks for your time.
Regards...
More detail would be good, in what way doesn't it work?
When i press F5 to run the app, i can see iframe on page but there is no data in it. It is blank.
Show your iframe code, and however you are assigning its src attribute.
Hi friends,
Thanks for your time and support. It works fine.
Regards...
Subscribe to:
Posts (Atom)