Clear the Render info & change to different info

Discussion in 'ASP .Net' started by Andrea Williams, Oct 27, 2004.

  1. I have a form where the user chooses reporting options and when submit is
    clicked, I need to present them with dynamically created excel file. In
    Classic ASP I would just change the viewing options, but in ASP.NET I'm
    using code-behind. Is there a way to clear what is scheduled to be
    renedered and write new information into the page render?

    OR

    Should I Server.Transfer to a different page that renders the correct info?

    Andrea
    Andrea Williams, Oct 27, 2004
    #1
    1. Advertising

  2. Hi Andrea,

    You can override the Render event and send back any response you want:

    Protected Overrides Sub Render(ByVal writer As
    System.Web.UI.HtmlTextWriter)
    If (you want the render the page as is) Then
    MyBase.Render()
    Else
    Your rendering code.
    End If
    End Sub

    Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "Andrea Williams" <> wrote in message
    news:...
    > I have a form where the user chooses reporting options and when submit is
    > clicked, I need to present them with dynamically created excel file. In
    > Classic ASP I would just change the viewing options, but in ASP.NET I'm
    > using code-behind. Is there a way to clear what is scheduled to be
    > renedered and write new information into the page render?
    >
    > OR
    >
    > Should I Server.Transfer to a different page that renders the correct

    info?
    >
    > Andrea
    >
    >
    Ken Dopierala Jr., Oct 27, 2004
    #2
    1. Advertising

  3. I forgot, if you use MyBase.Render() to render as is then include the writer
    in the call:

    MyBase.Render(writer)

    Good luck! Ken.

    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "Ken Dopierala Jr." <> wrote in message
    news:udv2G$...
    > Hi Andrea,
    >
    > You can override the Render event and send back any response you want:
    >
    > Protected Overrides Sub Render(ByVal writer As
    > System.Web.UI.HtmlTextWriter)
    > If (you want the render the page as is) Then
    > MyBase.Render()
    > Else
    > Your rendering code.
    > End If
    > End Sub
    >
    > Good luck! Ken.
    >
    > --
    > Ken Dopierala Jr.
    > For great ASP.Net web hosting try:
    > http://www.webhost4life.com/default.asp?refid=Spinlight
    > If you sign up under me and need help, email me.
    >
    > "Andrea Williams" <> wrote in message
    > news:...
    > > I have a form where the user chooses reporting options and when submit

    is
    > > clicked, I need to present them with dynamically created excel file. In
    > > Classic ASP I would just change the viewing options, but in ASP.NET I'm
    > > using code-behind. Is there a way to clear what is scheduled to be
    > > renedered and write new information into the page render?
    > >
    > > OR
    > >
    > > Should I Server.Transfer to a different page that renders the correct

    > info?
    > >
    > > Andrea
    > >
    > >

    >
    >
    Ken Dopierala Jr., Oct 27, 2004
    #3
    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. Lau Lei Cheong

    Page.Render do not render complete page

    Lau Lei Cheong, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,065
    Lau Lei Cheong
    May 15, 2004
  2. pinhead
    Replies:
    0
    Views:
    546
    pinhead
    Oct 15, 2005
  3. David

    Response.Clear() doesn't clear

    David, Jan 31, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    1,018
    Mark Fitzpatrick
    Jan 31, 2008
  4. InvalidLastName

    Unrecognized element 'add' after <clear></clear>

    InvalidLastName, Feb 26, 2007, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    956
    Steven Cheng[MSFT]
    Mar 6, 2007
  5. Glenn Gillen
    Replies:
    0
    Views:
    274
    Glenn Gillen
    Nov 17, 2006
Loading...

Share This Page