-2

the reason why i am asking is because i am trying to create a self aware Iframe to make sure it's position stays. As a first step is to download fully the html and css code to database in order to know where the position now and adapt to future page changes. p.s an #id method not always works...

alien
  • 29
  • 11
  • 1
    Your question is unclear. At first it sounds like the answer is "yes, you can store HTML in a database", but then you ask about position, which is not part of the iframe - it's part of the page that the iframe is in. Or do you mean the position of the scrollbar? That too is not stored in the iframe's HTML and/or CSS. – Mr Lister Sep 04 '16 at 10:49
  • i asked a question and explained why i asked in body...the rest of development i will try to do myself i only asked can it be done and if so how...example of a code – alien Sep 04 '16 at 11:18
  • But is the question how to retrieve the resulting HTML that was created by an ASP page as a string, or more how you can put a string of unknown length in a database? – Mr Lister Sep 04 '16 at 11:49
  • well the question is how to do so?how to take a webpage and download it wholy in asp. i believe a memo is used as a field since the size is too big for a string. – alien Sep 04 '16 at 11:56

1 Answers1

1

There is no way to return a content of the Response object and if you need it,

  • you either should create the entire output as a string and then do Response.Write

    html = "<html><title>..." ' full iframe/html here
    Response.Write html
    ...
    do something and save html in database when needed
    
  • or grab the content of the iframe/html using a new request to the same url (sample code)

I would, however, doubt if that makes sense. If position is not always stay then you might want to change page layout, create javascript, etc. but not save the page in the database. Maybe you should try to make a simple sample code to make your problem clear.

user2316116
  • 6,726
  • 1
  • 21
  • 35
  • i need to figure out the first step which is to download a webpage content, something like http://stackoverflow.com/questions/16642196/get-html-code-from-website-in-c-sharp but i need an asp code to do so. – alien Sep 07 '16 at 14:34
  • didn't noticed, get apology :) – alien Sep 11 '16 at 12:56