www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > .NET

    .NET Discussion and technical support for, building, using and deploying .NET sites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 12-07-2004, 02:59 PM
    mcrpds mcrpds is offline
    Registered User
     
    Join Date: Oct 2004
    Location: los angeles
    Posts: 51
    display static html file in div tag...how?

    .net gurus,
    i am building a web page and i want to display an html file. i created a div tag as follows:
    <DIV id="container" align="center" style="Z-INDEX: 104; LEFT: 150px; WIDTH: 440px; POSITION: absolute; TOP: 41px; HEIGHT: 728px" dataSrc='"c:\inetput\wwwroot\report\html\chart21.html"'></DIV>

    this does not work, can anyone please help or suggest an alternative solution. thank you in advance!
    Reply With Quote
      #2  
    Old 12-07-2004, 09:22 PM
    PeOfEo's Avatar
    PeOfEo PeOfEo is offline
    Data Center Troll
     
    Join Date: Nov 2002
    Location: Auburn, AL
    Posts: 10,037
    The easiest way is to just do a server side include.
    http://www.w3schools.com/asp/asp_incfiles.asp
    That example is for asp classic, but asp classic and asp.net share the same syntax for including, that syntax is the same for SSI too.

    You can include anything like this that is a standard ascii file (.inc, .asp, .htm, .txt, so on and so fourth). But do not put <head><body><html> tags in the code, as this will write all of the contents of the external file directly where you put the include code, so you will consequently have two <html> tags or something if you do that. This will cause havoc on your pages.
    Reply With Quote
      #3  
    Old 12-08-2004, 10:04 AM
    mcrpds mcrpds is offline
    Registered User
     
    Join Date: Oct 2004
    Location: los angeles
    Posts: 51
    PeOfEo,
    Thanks for the ideal. The static files of this report is from crystal (exported as html), it works great for the first page (include) but the <<next>> page links just overwrite all of my graphics since it is an html file on the anchor tag. If you know of another possible solution or approach, I would be all ears. Thanks again for your time!
    Reply With Quote
      #4  
    Old 12-08-2004, 07:51 PM
    PeOfEo's Avatar
    PeOfEo PeOfEo is offline
    Data Center Troll
     
    Join Date: Nov 2002
    Location: Auburn, AL
    Posts: 10,037
    Well you could write out the file manually, but replace all of the bad tags with "".
    Reply With Quote
      #5  
    Old 12-11-2004, 08:52 PM
    Cstick Cstick is offline
    StickMaster
     
    Join Date: Sep 2004
    Location: Northeast, FL
    Posts: 332
    Look into using Page.Response. http://www.devx.com/tips/Tip/18010 Basically you could do exactly what that article explains except you'd be exporting as an HTML file.
    Reply With Quote
      #6  
    Old 12-11-2004, 11:06 PM
    PeOfEo's Avatar
    PeOfEo PeOfEo is offline
    Data Center Troll
     
    Join Date: Nov 2002
    Location: Auburn, AL
    Posts: 10,037
    Quote:
    Originally posted by Cstick
    Look into using Page.Response. http://www.devx.com/tips/Tip/18010 Basically you could do exactly what that article explains except you'd be exporting as an HTML file.
    He could do that, but he would still need to parse through the document and drop all of the extra tags so he is going to need to get this thing into the form of a string and run some replace statements.
    Reply With Quote
      #7  
    Old 12-12-2004, 09:32 AM
    Cstick Cstick is offline
    StickMaster
     
    Join Date: Sep 2004
    Location: Northeast, FL
    Posts: 332
    Assumming that the hyperlinked images appear properly when browsed to in their current location. Perhaps he could use an iFrame to display the file.

    Another alternative, he could use either of the methods that you or I suggested previously, however he could have Crystal export the HTML file with absolute URL's to the images and hyperlinks.
    Reply With Quote
      #8  
    Old 12-12-2004, 10:10 AM
    PeOfEo's Avatar
    PeOfEo PeOfEo is offline
    Data Center Troll
     
    Join Date: Nov 2002
    Location: Auburn, AL
    Posts: 10,037
    I am one of those anti iframe activists.
    Reply With Quote
      #9  
    Old 12-12-2004, 10:42 AM
    mcrpds mcrpds is offline
    Registered User
     
    Join Date: Oct 2004
    Location: los angeles
    Posts: 51
    i was thinking iframes would basically solve the problem, but why are so many programmers down on framesets? also i was thinking of using master pages, i saw a website www.wilsondotnet.com that may possibly be a solution to this mess. thanks for so many responses and ideas!
    Reply With Quote
      #10  
    Old 12-12-2004, 08:48 PM
    PeOfEo's Avatar
    PeOfEo PeOfEo is offline
    Data Center Troll
     
    Join Date: Nov 2002
    Location: Auburn, AL
    Posts: 10,037
    The reason people are not fond of iframes (or frames in general) is because they hurt your ability to design, they are not too user friendly, and they kill accessibility.
    Reply With Quote
      #11  
    Old 11-18-2009, 11:23 AM
    tomtam100 tomtam100 is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 2
    How To Load External Html Document Into the Web Page using Asp.Net

    take a look at this article:
    http://sevenadoo.com/AspNet-d1/How-T...AspNet-c2.aspx

    Reply With Quote
      #12  
    Old 11-18-2009, 11:24 AM
    tomtam100 tomtam100 is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 2
    check this article:
    http://sevenadoo.com/AspNet-d1/How-T...AspNet-c2.aspx
    Reply With Quote
      #13  
    Old 11-18-2009, 05:45 PM
    ssystems ssystems is offline
    Registered User
     
    Join Date: Oct 2009
    Posts: 226
    Assuming you can't modify the output format the one solution I can think of is to create a user web control and on the code behind make the request to the source page then drop the extra tags as mentioned above. Just output it in a asp:Literal or asp:Label if you wish.
    __________________
    Good Luck

    Santos Systems
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:31 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.