Beginners Question Regarding Static Web Pages

Discussion in 'ASP .Net' started by Roger stevenson, Apr 30, 2005.

  1. Hi
    I am a converting VB6 programmer. Having completed a Windows forms project ,
    andbefore moving on to some of my ASP.Net projects I want to add a lot of
    function to a VB 6 application that generates static web pages which display
    segments of data bases. The applicaton is used by a lot of sporting bodies
    that largelely get by on non-interactive free sites
    I have just finished a quick skim through a book on Professional ASP dot net
    looking for ways to do this. It is possible to use the function of Asp.Net
    to generate the rendered output , save it in a file and then move on to
    another form and do the same. Or do I write a module which finds the data
    and generates the text output.in the old way
    Roger Stenson
     
    Roger stevenson, Apr 30, 2005
    #1
    1. Advertising

  2. Roger stevenson

    Scott Allen Guest

    Hi Roger:

    I'm trying to understand your basic requirement.

    Do you need to generate HTML files based on database content?
    Or do you want to convert static content to something a little more
    dynamic with ASP.NET web forms?

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/


    On Sat, 30 Apr 2005 20:56:33 GMT, "Roger stevenson"
    <> wrote:

    >Hi
    >I am a converting VB6 programmer. Having completed a Windows forms project ,
    >andbefore moving on to some of my ASP.Net projects I want to add a lot of
    >function to a VB 6 application that generates static web pages which display
    >segments of data bases. The applicaton is used by a lot of sporting bodies
    >that largelely get by on non-interactive free sites
    >I have just finished a quick skim through a book on Professional ASP dot net
    >looking for ways to do this. It is possible to use the function of Asp.Net
    >to generate the rendered output , save it in a file and then move on to
    >another form and do the same. Or do I write a module which finds the data
    >and generates the text output.in the old way
    >Roger Stenson
    >
     
    Scott Allen, May 1, 2005
    #2
    1. Advertising

  3. Thanks for your interest
    I need to generate HTML Files which basically consist of a header section
    and then a Table
    The table contains , ranked results from competitions usuall having player
    name on the left
    maybe 10 results in the line then a performance section on the right
    containing Sums, Averages, BestX's etc on the right

    If it was an aspx page I was thinking I could get a Table from the database
    contaiing the selected data, calculate the perfomance columns and then
    just bind it to control on the form representing the table. Then all I need
    to do is save the rendered output, ready for uploading.
    There are typically about 10 of these tables published each week updated by
    the week's performances.
    I wrote the application for my own club. It proved very popular and I have
    ended up running it for a lot of clubs. The next verssion is going to pull
    all the club variants into a generalised common system and make it friendly
    enough to hand it over to club secretaries to run
    The system will add some pages to an otherwise static web site that needs
    uploading to the web site by the club secretary

    Roger Stenson

    "Scott Allen" <> wrote in message
    news:...
    > Hi Roger:
    >
    > I'm trying to understand your basic requirement.
    >
    > Do you need to generate HTML files based on database content?
    > Or do you want to convert static content to something a little more
    > dynamic with ASP.NET web forms?
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    >
    > On Sat, 30 Apr 2005 20:56:33 GMT, "Roger stevenson"
    > <> wrote:
    >
    >>Hi
    >>I am a converting VB6 programmer. Having completed a Windows forms project
    >>,
    >>andbefore moving on to some of my ASP.Net projects I want to add a lot of
    >>function to a VB 6 application that generates static web pages which
    >>display
    >>segments of data bases. The applicaton is used by a lot of sporting bodies
    >>that largelely get by on non-interactive free sites
    >>I have just finished a quick skim through a book on Professional ASP dot
    >>net
    >>looking for ways to do this. It is possible to use the function of Asp.Net
    >>to generate the rendered output , save it in a file and then move on to
    >>another form and do the same. Or do I write a module which finds the data
    >>and generates the text output.in the old way
    >>Roger Stenson
    >>

    >
     
    Roger stevenson, May 1, 2005
    #3
  4. Roger stevenson

    Scott Allen Guest

    Hi Roger:

    Take a look at the DataGrid control in the ASP.NET toolbar. You can
    bind this control to a SQL query that pulls records from the database.
    The control will generate a table and is easy to customize, sort, and
    page. A google search will give you lots of sample code to look at,
    too.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Sun, 01 May 2005 05:59:27 GMT, "Roger stevenson"
    <> wrote:

    >Thanks for your interest
    >I need to generate HTML Files which basically consist of a header section
    >and then a Table
    >The table contains , ranked results from competitions usuall having player
    >name on the left
    >maybe 10 results in the line then a performance section on the right
    >containing Sums, Averages, BestX's etc on the right
    >
    >If it was an aspx page I was thinking I could get a Table from the database
    >contaiing the selected data, calculate the perfomance columns and then
    >just bind it to control on the form representing the table. Then all I need
    >to do is save the rendered output, ready for uploading.
    >There are typically about 10 of these tables published each week updated by
    >the week's performances.
    >I wrote the application for my own club. It proved very popular and I have
    >ended up running it for a lot of clubs. The next verssion is going to pull
    >all the club variants into a generalised common system and make it friendly
    >enough to hand it over to club secretaries to run
    >The system will add some pages to an otherwise static web site that needs
    >uploading to the web site by the club secretary
    >
    >Roger Stenson
    >
    >"Scott Allen" <> wrote in message
    >news:...
    >> Hi Roger:
    >>
    >> I'm trying to understand your basic requirement.
    >>
    >> Do you need to generate HTML files based on database content?
    >> Or do you want to convert static content to something a little more
    >> dynamic with ASP.NET web forms?
    >>
    >> --
    >> Scott
    >> http://www.OdeToCode.com/blogs/scott/
    >>
    >>
    >> On Sat, 30 Apr 2005 20:56:33 GMT, "Roger stevenson"
    >> <> wrote:
    >>
    >>>Hi
    >>>I am a converting VB6 programmer. Having completed a Windows forms project
    >>>,
    >>>andbefore moving on to some of my ASP.Net projects I want to add a lot of
    >>>function to a VB 6 application that generates static web pages which
    >>>display
    >>>segments of data bases. The applicaton is used by a lot of sporting bodies
    >>>that largelely get by on non-interactive free sites
    >>>I have just finished a quick skim through a book on Professional ASP dot
    >>>net
    >>>looking for ways to do this. It is possible to use the function of Asp.Net
    >>>to generate the rendered output , save it in a file and then move on to
    >>>another form and do the same. Or do I write a module which finds the data
    >>>and generates the text output.in the old way
    >>>Roger Stenson
    >>>

    >>

    >
     
    Scott Allen, May 1, 2005
    #4
  5. Thanks very much. However you average club secretary is looking to click on
    a (batch) run 'ProduceWeBPages' which runs down a schedule of his
    requirements, generates all the related html files and puts them into an
    output fule ready to upload to the web site.
    Its the batch aspects of working through a schedule of pages and saving the
    rendered output that I can not see how to do in an asp.net.system
    The current system its a vb6 batch job that looks at the schedule, recovers
    the data, clothes it in html and writes the html documents one by one.
    Roger
    "Roger stevenson" <> wrote in message
    news:5iSce.2924$...
    > Hi
    > I am a converting VB6 programmer. Having completed a Windows forms project
    > , andbefore moving on to some of my ASP.Net projects I want to add a lot
    > of function to a VB 6 application that generates static web pages which
    > display segments of data bases. The applicaton is used by a lot of
    > sporting bodies that largelely get by on non-interactive free sites
    > I have just finished a quick skim through a book on Professional ASP dot
    > net looking for ways to do this. It is possible to use the function of
    > Asp.Net to generate the rendered output , save it in a file and then move
    > on to another form and do the same. Or do I write a module which finds the
    > data and generates the text output.in the old way
    > Roger Stenson
    >
     
    Roger stevenson, May 2, 2005
    #5
  6. Why in the world would you want to create an ASP.NET application that
    generates static HTML pages. That can happen, but those static pages are
    going to exist on the Web server - not the client - so your "average
    secretary" isn't going to be able to then upload to their own Web site. It
    sounds like your VB6 app is doing a great job. Can you clarify for us what
    benefits you want to achieve by migrating this thing to ASP.NET?


    "Roger stevenson" <> wrote in message
    news:Sprde.10223$...
    > Thanks very much. However you average club secretary is looking to click
    > on a (batch) run 'ProduceWeBPages' which runs down a schedule of his
    > requirements, generates all the related html files and puts them into an
    > output fule ready to upload to the web site.
    > Its the batch aspects of working through a schedule of pages and saving
    > the rendered output that I can not see how to do in an asp.net.system
    > The current system its a vb6 batch job that looks at the schedule,
    > recovers the data, clothes it in html and writes the html documents one by
    > one.
    > Roger
    > "Roger stevenson" <> wrote in message
    > news:5iSce.2924$...
    >> Hi
    >> I am a converting VB6 programmer. Having completed a Windows forms
    >> project , andbefore moving on to some of my ASP.Net projects I want to
    >> add a lot of function to a VB 6 application that generates static web
    >> pages which display segments of data bases. The applicaton is used by a
    >> lot of sporting bodies that largelely get by on non-interactive free
    >> sites
    >> I have just finished a quick skim through a book on Professional ASP dot
    >> net looking for ways to do this. It is possible to use the function of
    >> Asp.Net to generate the rendered output , save it in a file and then move
    >> on to another form and do the same. Or do I write a module which finds
    >> the data and generates the text output.in the old way
    >> Roger Stenson
    >>

    >
    >
     
    Jordan Richard, May 2, 2005
    #6
  7. Roger,

    I have been searching for two days for articles that would give a clue as
    how you can do this, but all have fallen short.

    Essentially, what you're looking for is a way to take the standard
    Response.Output stream and send it to a file that you define rather than back
    to the client browser that requested it. By doing that, you can design a web
    page using mostly static HTML and then run the web page in a loop, for
    example, and produce 1000 static product pages.

    let me know if you figure this out.


    "Roger stevenson" wrote:

    > Hi
    > I am a converting VB6 programmer. Having completed a Windows forms project ,
    > andbefore moving on to some of my ASP.Net projects I want to add a lot of
    > function to a VB 6 application that generates static web pages which display
    > segments of data bases. The applicaton is used by a lot of sporting bodies
    > that largelely get by on non-interactive free sites
    > I have just finished a quick skim through a book on Professional ASP dot net
    > looking for ways to do this. It is possible to use the function of Asp.Net
    > to generate the rendered output , save it in a file and then move on to
    > another form and do the same. Or do I write a module which finds the data
    > and generates the text output.in the old way
    > Roger Stenson
    >
    >
    >
     
    =?Utf-8?B?cGV0ZQ==?=, Jun 30, 2005
    #7
  8. Roger,

    I contacted a friend and we came up with this...

    protected override void Render( System.Web.UI.HtmlTextWriter writer ) {
    System.IO.TextWriter tw = System.IO.File.CreateText( @"c:\sample.html"
    );
    System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter( tw
    );
    base.Render( hw );
    tw.Close();
    }

    Add that code to an ASPX (rename the sample.html file to your own filespec)
    and you're in business.


    "Roger stevenson" wrote:

    > Hi
    > I am a converting VB6 programmer. Having completed a Windows forms project ,
    > andbefore moving on to some of my ASP.Net projects I want to add a lot of
    > function to a VB 6 application that generates static web pages which display
    > segments of data bases. The applicaton is used by a lot of sporting bodies
    > that largelely get by on non-interactive free sites
    > I have just finished a quick skim through a book on Professional ASP dot net
    > looking for ways to do this. It is possible to use the function of Asp.Net
    > to generate the rendered output , save it in a file and then move on to
    > another form and do the same. Or do I write a module which finds the data
    > and generates the text output.in the old way
    > Roger Stenson
    >
    >
    >
     
    =?Utf-8?B?cGV0ZQ==?=, Jun 30, 2005
    #8
  9. Roger stevenson

    Sam Samnah Guest

    If you want want to build html from the browser you really need to implement
    the MSHTML Editor and run some client script.
    "pete" <> wrote in message
    news:...
    > Roger,
    >
    > I have been searching for two days for articles that would give a clue as
    > how you can do this, but all have fallen short.
    >
    > Essentially, what you're looking for is a way to take the standard
    > Response.Output stream and send it to a file that you define rather than
    > back
    > to the client browser that requested it. By doing that, you can design a
    > web
    > page using mostly static HTML and then run the web page in a loop, for
    > example, and produce 1000 static product pages.
    >
    > let me know if you figure this out.
    >
    >
    > "Roger stevenson" wrote:
    >
    >> Hi
    >> I am a converting VB6 programmer. Having completed a Windows forms
    >> project ,
    >> andbefore moving on to some of my ASP.Net projects I want to add a lot of
    >> function to a VB 6 application that generates static web pages which
    >> display
    >> segments of data bases. The applicaton is used by a lot of sporting
    >> bodies
    >> that largelely get by on non-interactive free sites
    >> I have just finished a quick skim through a book on Professional ASP dot
    >> net
    >> looking for ways to do this. It is possible to use the function of
    >> Asp.Net
    >> to generate the rendered output , save it in a file and then move on to
    >> another form and do the same. Or do I write a module which finds the data
    >> and generates the text output.in the old way
    >> Roger Stenson
    >>
    >>
    >>
     
    Sam Samnah, Jul 1, 2005
    #9
    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. Nathan Sokalski
    Replies:
    5
    Views:
    1,078
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  2. Nathan Sokalski
    Replies:
    4
    Views:
    337
    Nathan Sokalski
    Dec 21, 2006
  3. Nathan Sokalski
    Replies:
    4
    Views:
    374
    Nathan Sokalski
    Dec 21, 2006
  4. Sandeep Guria
    Replies:
    5
    Views:
    147
    Sandeep Guria
    Feb 25, 2011
  5. William Colls
    Replies:
    4
    Views:
    2,136
    Roedy Green
    Mar 20, 2012
Loading...

Share This Page