Converting Data from web screen to html file.

Converting Data from web screen to html file.

  

Hi everyone, I am a bit new to Outsystems.  My issue is this, I have a rest API in which I am receiving data from and I am displaying the data to a web screen.  My question is, I would like to get the data being displayed in the web screen and convert it to an html file.  How can I go about accomplishing this?

Hum...

I'm not sure I got the idea...

The page you see in the browser, with your information, IS an html file (even if the extension is aspx).

What exactly are you trying to accomplish?

Cheers, 

Eduardo Jauch

Hi Jerry ,

Do you want to get the html from the Body ?



Regards

-PJ-

Hi Jerry,

I have not seen but there may be something in Os to get this .

In Asp.net we can get it from this code

using (System.Net.WebClient client = new WebClient())
            {
               
                // Or you can get the file content without saving it:
                string htmlCode = client.DownloadString(your url goes here);
               
            }


Regards

-PJ-


Hi,

If the objective is to download the HTML, the easiest way is to simply add the tag "download" in the extended properties of a link that points to the page itself.

When the user clicks the link, it will open the Save As window to the user to chose the place to save the file (the html).

If the link itself is not desired, you can pass an input parameter to say to hide the link when coming from the link, and put an IF in the screen to take care of this for you.

P.S. I don't know if the tag download works on all browsers or very old versions. It is important to test on the browsers your application will support.

Eduardo Jauch wrote:

Hi,

If the objective is to download the HTML, the easiest way is to simply add the tag "download" in the extended properties of a link that points to the page itself.

When the user clicks the link, it will open the Save As window to the user to chose the place to save the file (the html).

If the link itself is not desired, you can pass an input parameter to say to hide the link when coming from the link, and put an IF in the screen to take care of this for you.

P.S. I don't know if the tag download works on all browsers or very old versions. It is important to test on the browsers your application will support.


The idea is that I would like to do something like this.  See the link below.  I would like to save that html into a file and allow the use to download that file.

https://www.w3schools.com/js/tryit.asp?filename=tryjson_html_table




The idea is that I would like to do something like this.  See the link below.  I would like to save that html into a file and allow the use to download that file.

https://www.w3schools.com/js/tryit.asp?filename=tryjson_html_table


Thanks for any help.

Solution

Jerry Sylveus wrote:



The idea is that I would like to do something like this.  See the link below.  I would like to save that html into a file and allow the use to download that file.

https://www.w3schools.com/js/tryit.asp?filename=tryjson_html_table


Thanks for any help.

Hi Jerry.

If you want to save as HTML, you can do as I said before.

But if the idea is to provide the user with a list (one or more columns), with the data from the database, the better would be to use the very known pattern Aggregate/TableList+listToExcel+Download.

This way, the user will have the data in an excel file.

Cheers,

Eduardo Jauch


Solution

Thanks everyone