How get resulting HTML of datagrid

Discussion in 'ASP .Net' started by VB Programmer, Aug 4, 2004.

  1. I have a databound datagrid on an aspx form. How can I get the resulting
    html that is generated via code? I want to response.write the html results
    (of the dg) to the end of another html page.

    Any ideas?
    VB Programmer, Aug 4, 2004
    #1
    1. Advertising

  2. VB Programmer

    Juno Guest

    Hi,

    datagrid is transferred to a table in client side, so if you want html code
    in client, use outerHTML property of that table to get whole html code.

    --
    Juno
    MCSD.NET, MCDBA, MCSE
    ----------------------------------------------------------
    Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
    DataForm.NET - The most powerful data entry web server control for ASP.NET



    "VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote in message
    news:...
    > I have a databound datagrid on an aspx form. How can I get the resulting
    > html that is generated via code? I want to response.write the html

    results
    > (of the dg) to the end of another html page.
    >
    > Any ideas?
    >
    >
    Juno, Aug 4, 2004
    #2
    1. Advertising

  3. Use the DataGrid.RenderControl method.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote in message
    news:...
    > I have a databound datagrid on an aspx form. How can I get the resulting
    > html that is generated via code? I want to response.write the html

    results
    > (of the dg) to the end of another html page.
    >
    > Any ideas?
    >
    >
    Steve C. Orr [MVP, MCSD], Aug 4, 2004
    #3
  4. Thanks. Let me clarify what I'm trying to do:

    I have a class which opens, reads, then writes the contents of a given HTML
    file to the browser. Basically, all it does is display the HTML file. The
    catch is that there could be dynamic "keywords" scattered throughout the
    HTML, such as [Company], or [StreetAddress], etc.... My class, when it
    encounters these "keywords" during it's read, will do the necessary
    processing (which may include db lookups, etc...) and then will dynamically
    replace the keyword with the proper result, such as "ACME" for company name.
    A large HTML string is basically being built up, then a simple
    Response.Write will output the page. (If you were to view the ASPX page
    (that calls this class) in the Designer it is blank because the page is
    being created on the fly.)

    Here's the issue...
    One of the keywords that may be encountered is "[StatTable]". When this is
    encountered I need to populate a datagrid on the fly with data from the db
    and output the pure HTML to the screen.

    Any ideas?
    Are you all totally confused?

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > Use the DataGrid.RenderControl method.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote in message
    > news:...
    > > I have a databound datagrid on an aspx form. How can I get the

    resulting
    > > html that is generated via code? I want to response.write the html

    > results
    > > (of the dg) to the end of another html page.
    > >
    > > Any ideas?
    > >
    > >

    >
    >
    VB Programmer, Aug 4, 2004
    #4
    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. Bjorn Jensen
    Replies:
    2
    Views:
    822
    Bjorn Jensen
    Mar 22, 2005
  2. James Wallace
    Replies:
    0
    Views:
    1,049
    James Wallace
    Oct 17, 2003
  3. Anatoli Trifonov

    ASP Control names in resulting HTML

    Anatoli Trifonov, Jun 6, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    343
    John Saunders
    Jun 7, 2004
  4. Dil via .NET 247

    SHA1 length of resulting hash

    Dil via .NET 247, Aug 4, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    17,941
    Dil via .NET 247
    Aug 4, 2004
  5. VB Programmer

    How send email of resulting aspx page?

    VB Programmer, Apr 17, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    766
    VB Programmer
    Apr 19, 2005
Loading...

Share This Page