Display an HTML object referred to by SQL Server

Discussion in 'ASP .Net' started by Paul, Mar 16, 2006.

  1. Paul

    Paul Guest

    how can I display an HTML document that has been referred to by a SQL
    address? For example, I have a HTML doc called WoofInfo.htm. In a column
    in my SQL Server, I have the address a ~/Info/WoofInfo.htm. How can I get
    an ASP.Net page to display the contents of the HTML file?

    TIA,

    Paul
    Paul, Mar 16, 2006
    #1
    1. Advertising

  2. Paul,

    There is a number of options. How do you want to render the file? To replace
    the current page in the same window? In a separate frame? In a popup window?

    Eliyahu

    "Paul" <> wrote in message
    news:NKdSf.270$...
    > how can I display an HTML document that has been referred to by a SQL
    > address? For example, I have a HTML doc called WoofInfo.htm. In a column
    > in my SQL Server, I have the address a ~/Info/WoofInfo.htm. How can I get
    > an ASP.Net page to display the contents of the HTML file?
    >
    > TIA,
    >
    > Paul
    >
    Eliyahu Goldin, Mar 16, 2006
    #2
    1. Advertising

  3. Paul

    Paul Guest

    Thanks.
    I would like to have functionality similar to an asp.net label. I have a
    FormView with other information, and would like to have it displayed in an
    area like a label control (that just displays now the path).

    Paolo

    "Eliyahu Goldin" <> wrote in message
    news:...
    > Paul,
    >
    > There is a number of options. How do you want to render the file? To
    > replace the current page in the same window? In a separate frame? In a
    > popup window?
    >
    > Eliyahu
    >
    > "Paul" <> wrote in message
    > news:NKdSf.270$...
    >> how can I display an HTML document that has been referred to by a SQL
    >> address? For example, I have a HTML doc called WoofInfo.htm. In a
    >> column in my SQL Server, I have the address a ~/Info/WoofInfo.htm. How
    >> can I get an ASP.Net page to display the contents of the HTML file?
    >>
    >> TIA,
    >>
    >> Paul
    >>

    >
    >
    Paul, Mar 16, 2006
    #3
  4. I can use an asp.net label. Just read the file content into a string and
    assign it to the label's Text property.

    Eliyahu

    "Paul" <> wrote in message
    news:HgeSf.76$...
    > Thanks.
    > I would like to have functionality similar to an asp.net label. I have a
    > FormView with other information, and would like to have it displayed in an
    > area like a label control (that just displays now the path).
    >
    > Paolo
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >> Paul,
    >>
    >> There is a number of options. How do you want to render the file? To
    >> replace the current page in the same window? In a separate frame? In a
    >> popup window?
    >>
    >> Eliyahu
    >>
    >> "Paul" <> wrote in message
    >> news:NKdSf.270$...
    >>> how can I display an HTML document that has been referred to by a SQL
    >>> address? For example, I have a HTML doc called WoofInfo.htm. In a
    >>> column in my SQL Server, I have the address a ~/Info/WoofInfo.htm. How
    >>> can I get an ASP.Net page to display the contents of the HTML file?
    >>>
    >>> TIA,
    >>>
    >>> Paul
    >>>

    >>
    >>

    >
    >
    Eliyahu Goldin, Mar 16, 2006
    #4
  5. Paul

    Paul Guest

    Thanks. Can you please show how?

    Paul

    "Eliyahu Goldin" <> wrote in message
    news:...
    >I can use an asp.net label. Just read the file content into a string and
    >assign it to the label's Text property.
    >
    > Eliyahu
    >
    > "Paul" <> wrote in message
    > news:HgeSf.76$...
    >> Thanks.
    >> I would like to have functionality similar to an asp.net label. I have a
    >> FormView with other information, and would like to have it displayed in
    >> an area like a label control (that just displays now the path).
    >>
    >> Paolo
    >>
    >> "Eliyahu Goldin" <> wrote in message
    >> news:...
    >>> Paul,
    >>>
    >>> There is a number of options. How do you want to render the file? To
    >>> replace the current page in the same window? In a separate frame? In a
    >>> popup window?
    >>>
    >>> Eliyahu
    >>>
    >>> "Paul" <> wrote in message
    >>> news:NKdSf.270$...
    >>>> how can I display an HTML document that has been referred to by a SQL
    >>>> address? For example, I have a HTML doc called WoofInfo.htm. In a
    >>>> column in my SQL Server, I have the address a ~/Info/WoofInfo.htm. How
    >>>> can I get an ASP.Net page to display the contents of the HTML file?
    >>>>
    >>>> TIA,
    >>>>
    >>>> Paul
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Paul, Mar 16, 2006
    #5
  6. string fileName = MapPath(theUrlFromDatabase);
    System.IO.StreamReader sr = new System.IO.StreamReader (fileName);
    string htmlFromFile = sr.readToEnd();
    myLabel.Text = htmlFromFile;

    Eliyahu

    "Paul" <> wrote in message
    news:XveSf.78$...
    > Thanks. Can you please show how?
    >
    > Paul
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    >>I can use an asp.net label. Just read the file content into a string and
    >>assign it to the label's Text property.
    >>
    >> Eliyahu
    >>
    >> "Paul" <> wrote in message
    >> news:HgeSf.76$...
    >>> Thanks.
    >>> I would like to have functionality similar to an asp.net label. I have
    >>> a FormView with other information, and would like to have it displayed
    >>> in an area like a label control (that just displays now the path).
    >>>
    >>> Paolo
    >>>
    >>> "Eliyahu Goldin" <> wrote in message
    >>> news:...
    >>>> Paul,
    >>>>
    >>>> There is a number of options. How do you want to render the file? To
    >>>> replace the current page in the same window? In a separate frame? In a
    >>>> popup window?
    >>>>
    >>>> Eliyahu
    >>>>
    >>>> "Paul" <> wrote in message
    >>>> news:NKdSf.270$...
    >>>>> how can I display an HTML document that has been referred to by a SQL
    >>>>> address? For example, I have a HTML doc called WoofInfo.htm. In a
    >>>>> column in my SQL Server, I have the address a ~/Info/WoofInfo.htm.
    >>>>> How can I get an ASP.Net page to display the contents of the HTML
    >>>>> file?
    >>>>>
    >>>>> TIA,
    >>>>>
    >>>>> Paul
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Eliyahu Goldin, Mar 16, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Tholkes
    Replies:
    2
    Views:
    418
    Yan-Hong Huang[MSFT]
    Jun 30, 2003
  2. Jody Burgess
    Replies:
    2
    Views:
    539
    George Kinney
    Jul 17, 2004
  3. Liat Koski
    Replies:
    2
    Views:
    320
    Scott David Daniels
    Feb 22, 2005
  4. Replies:
    1
    Views:
    279
    Sion Arrowsmith
    Sep 28, 2006
  5. jeniffer
    Replies:
    12
    Views:
    778
    Jordan Abel
    Mar 29, 2006
Loading...

Share This Page