I cant response.write...

Discussion in 'ASP .Net' started by =?Utf-8?B?QXNoYQ==?=, Oct 11, 2004.

  1. hello, from my main page, i have an iframe which calls another .aspx file;
    and the other .aspx file will response.write values to it. but i keep getting
    the below message. can someone pleasehelp me okie here? thanks.

    ?exception
    {System.Web.HttpException}
    [System.Web.HttpException]: {System.Web.HttpException}
    HelpLink: Nothing
    InnerException: Nothing
    Message: "Response is not available in this context."
    Source: "System.Web"
    StackTrace: " at System.Web.UI.Page.get_Response()
    at DATTApp.SC_Ext_Rpt.GenerateExternalReport() in
    C:\DATT\Distributors\SC_Ext_Rpt.aspx.vb:line 102"
    TargetSite: {System.Reflection.RuntimeMethodInfo}
     
    =?Utf-8?B?QXNoYQ==?=, Oct 11, 2004
    #1
    1. Advertising

  2. There is a barrier between server and client in web applications. Once you
    send the bytes out, you cannot simply response.write from one page to
    another.

    To accomplish what you are attempting, you will have to write out client
    JavaScript that writes across the page barrier. With JavaScript, you can get
    to the main window and write to any frame. With an IFrame, you can write out
    to the parent page. If the parent also sits in a frameset, you can navigate
    to its parent and down to any other frame, either by ordinal value or by name.


    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************


    "Asha" wrote:

    > hello, from my main page, i have an iframe which calls another .aspx file;
    > and the other .aspx file will response.write values to it. but i keep getting
    > the below message. can someone pleasehelp me okie here? thanks.
    >
    > ?exception
    > {System.Web.HttpException}
    > [System.Web.HttpException]: {System.Web.HttpException}
    > HelpLink: Nothing
    > InnerException: Nothing
    > Message: "Response is not available in this context."
    > Source: "System.Web"
    > StackTrace: " at System.Web.UI.Page.get_Response()
    > at DATTApp.SC_Ext_Rpt.GenerateExternalReport() in
    > C:\DATT\Distributors\SC_Ext_Rpt.aspx.vb:line 102"
    > TargetSite: {System.Reflection.RuntimeMethodInfo}
     
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Oct 11, 2004
    #2
    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. Charles A. Lackman
    Replies:
    2
    Views:
    8,102
    Charles A. Lackman
    Jan 11, 2006
  2. Matthew Wieder

    Response.Write and Response.Redirect

    Matthew Wieder, Jul 17, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    762
    Kevin Spencer
    Jul 17, 2003
  3. Sehboo
    Replies:
    3
    Views:
    8,941
    Sehboo
    Dec 10, 2003
  4. =?Utf-8?B?QXNoYQ==?=

    iframe and response.write cant play well together?

    =?Utf-8?B?QXNoYQ==?=, Oct 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    685
    Hermit Dave
    Oct 12, 2004
  5. Nagaraj
    Replies:
    1
    Views:
    924
    Lionel B
    Mar 1, 2007
Loading...

Share This Page