iframe in aspx page

Discussion in 'ASP .Net' started by Fred, Aug 10, 2003.

  1. Fred

    Fred Guest

    I have an aspx page: Main.aspx which has several components that cause
    a postback. In the page Main.aspx I also have an iframe which contains
    a multi-page pdf file.

    The problem I am facing is that whenever the user does an action which
    causes a postback on the main page Main.aspx, the page posts back and
    the pdf file in the iframe is reloaded. This is a problem becuase if
    the user has rotated or magnified the page then that is lost.

    Is there anyway that the content in the iframe is not refreshed? Any
    other ideas to maintain the state of the pdf file.?

    Thanks a lot!

    Fred
    Fred, Aug 10, 2003
    #1
    1. Advertising

  2. Did you try using "Page.IsPostBack" Property?


    International Computer Systems (London) Ltd. The Courtyard, 14a Sydenham
    Road, Croydon, Surrey, CR0 2EE, United Kingdom www.icslondon.com Telephone:
    +44 (0) 208 681 5421, Facsimile: +44 (0) 208 688 1673 This email and any
    files transmitted with it are confidential and intended solely for the use
    of the individual or entity to whom they are addressed. This communication
    may contain information which may be privileged. If you are not the intended
    recipient or the person responsible for delivering the email to the intended
    recipient, you are advised that you have received this email in error and
    that any use, dissemination, forwarding, printing or copying of this email
    is strictly prohibited.
    "Fred" <> wrote in message
    news:...
    > I have an aspx page: Main.aspx which has several components that cause
    > a postback. In the page Main.aspx I also have an iframe which contains
    > a multi-page pdf file.
    >
    > The problem I am facing is that whenever the user does an action which
    > causes a postback on the main page Main.aspx, the page posts back and
    > the pdf file in the iframe is reloaded. This is a problem becuase if
    > the user has rotated or magnified the page then that is lost.
    >
    > Is there anyway that the content in the iframe is not refreshed? Any
    > other ideas to maintain the state of the pdf file.?
    >
    > Thanks a lot!
    >
    > Fred
    Mohammad A. Samara, Aug 10, 2003
    #2
    1. Advertising

  3. I'd suggest using regular frames instead of an IFrame.
    That way each frame posts back independently - one is not embedded within
    the other so you won't have this problem.

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


    "Fred" <> wrote in message
    news:...
    > I have an aspx page: Main.aspx which has several components that cause
    > a postback. In the page Main.aspx I also have an iframe which contains
    > a multi-page pdf file.
    >
    > The problem I am facing is that whenever the user does an action which
    > causes a postback on the main page Main.aspx, the page posts back and
    > the pdf file in the iframe is reloaded. This is a problem becuase if
    > the user has rotated or magnified the page then that is lost.
    >
    > Is there anyway that the content in the iframe is not refreshed? Any
    > other ideas to maintain the state of the pdf file.?
    >
    > Thanks a lot!
    >
    > Fred
    Steve C. Orr, MCSD, Aug 10, 2003
    #3
  4. Natty,
    can you provide us with an example of XMLHTTPREQUEST
    etc..
    Thanks


    "Natty Gur" <> wrote in message
    news:%...
    > Hi,
    >
    > If all of your clients based on IE you can use XMLHTTPREQUEST to access
    > the page, retrieve just the data that you need (no postback and
    > viewstate), and use javascript to update just the relevant HTML controls
    > (nothing refreshed or blinked on the client without smart navigation).
    >
    > Natty Gur, CTO
    > Dao2Com Ltd.
    > 34th Elkalay st. Raanana
    > Israel , 43000
    > Phone Numbers:
    > Office: +972-(0)9-7740261
    > Fax: +972-(0)9-7740261
    > Mobile: +972-(0)58-888377
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    MS News \(MS ILM\), Aug 10, 2003
    #4
  5. Fred

    Natty Gur Guest

    I’m writing an article on this issue. If you want sample e-mail
    ().

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Aug 11, 2003
    #5
  6. Fred

    PJ Guest

    DHTML behaviors are your friend...given you're in an IE 5.5+ environment.
    http://msdn.microsoft.com/library/d...-us/script56/html/letimplDHTML.asp?frame=true

    "MS News (MS ILM)" <> wrote in message
    news:...
    > Natty,
    > can you provide us with an example of XMLHTTPREQUEST
    > etc..
    > Thanks
    >
    >
    > "Natty Gur" <> wrote in message
    > news:%...
    > > Hi,
    > >
    > > If all of your clients based on IE you can use XMLHTTPREQUEST to access
    > > the page, retrieve just the data that you need (no postback and
    > > viewstate), and use javascript to update just the relevant HTML controls
    > > (nothing refreshed or blinked on the client without smart navigation).
    > >
    > > Natty Gur, CTO
    > > Dao2Com Ltd.
    > > 34th Elkalay st. Raanana
    > > Israel , 43000
    > > Phone Numbers:
    > > Office: +972-(0)9-7740261
    > > Fax: +972-(0)9-7740261
    > > Mobile: +972-(0)58-888377
    > >
    > >
    > > *** Sent via Developersdex http://www.developersdex.com ***
    > > Don't just participate in USENET...get rewarded for it!

    >
    >
    PJ, Aug 11, 2003
    #6
  7. Fred

    Natty Gur Guest

    IE 5.0 +

    "Windows® Script Components provide a lightweight, easily maintainable
    way to create components for implementing DHTML Behaviors available in
    Microsoft® Internet Explorer
    -----------------
    5.0. Using a script component allows script developers to
    ---
    implement behaviors using Microsoft® Visual Basic® Scripting Edition
    (VBScript), Microsoft® JScript® (ECMAScript), or any third party
    scripting language that supports the Microsoft® ActiveX® Scripting
    interfaces."



    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur, Aug 11, 2003
    #7
  8. The way most people would probably do it is to have a frameset with 3 frames
    containing: Pagemain, Page1, Page2

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Fred" <> wrote in message
    news:...
    > Thanks for all the replies. I feel that at this time without learning
    > a lot, doing it the frames way would be fastest. I need some help with
    > that.
    >
    > Can I have an aspx page with some components on it and at the sametime
    > have a frameset with two frames inside of it? e.g. have pagemain.aspx
    > with a datalist on it and also have a frameset with two frames: frameA
    > (containing page1.aspx) and frameB (containing page2.aspx) in it.
    >
    > Thanks,
    >
    > Fred
    >
    > "Steve C. Orr, MCSD" <> wrote in message

    news:<>...
    > > I'd suggest using regular frames instead of an IFrame.
    > > That way each frame posts back independently - one is not embedded

    within
    > > the other so you won't have this problem.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > http://Steve.Orr.net
    > >
    > >
    > > "Fred" <> wrote in message
    > > news:...
    > > > I have an aspx page: Main.aspx which has several components that cause
    > > > a postback. In the page Main.aspx I also have an iframe which contains
    > > > a multi-page pdf file.
    > > >
    > > > The problem I am facing is that whenever the user does an action which
    > > > causes a postback on the main page Main.aspx, the page posts back and
    > > > the pdf file in the iframe is reloaded. This is a problem becuase if
    > > > the user has rotated or magnified the page then that is lost.
    > > >
    > > > Is there anyway that the content in the iframe is not refreshed? Any
    > > > other ideas to maintain the state of the pdf file.?
    > > >
    > > > Thanks a lot!
    > > >
    > > > Fred
    Steve C. Orr, MCSD, Aug 12, 2003
    #8
  9. The way most people would probably do it is to have a frameset with 3 frames
    containing: Pagemain, Page1, Page2

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Fred" <> wrote in message
    news:...
    > Thanks for all the replies. I feel that at this time without learning
    > a lot, doing it the frames way would be fastest. I need some help with
    > that.
    >
    > Can I have an aspx page with some components on it and at the sametime
    > have a frameset with two frames inside of it? e.g. have pagemain.aspx
    > with a datalist on it and also have a frameset with two frames: frameA
    > (containing page1.aspx) and frameB (containing page2.aspx) in it.
    >
    > Thanks,
    >
    > Fred
    >
    > "Steve C. Orr, MCSD" <> wrote in message

    news:<>...
    > > I'd suggest using regular frames instead of an IFrame.
    > > That way each frame posts back independently - one is not embedded

    within
    > > the other so you won't have this problem.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > http://Steve.Orr.net
    > >
    > >
    > > "Fred" <> wrote in message
    > > news:...
    > > > I have an aspx page: Main.aspx which has several components that cause
    > > > a postback. In the page Main.aspx I also have an iframe which contains
    > > > a multi-page pdf file.
    > > >
    > > > The problem I am facing is that whenever the user does an action which
    > > > causes a postback on the main page Main.aspx, the page posts back and
    > > > the pdf file in the iframe is reloaded. This is a problem becuase if
    > > > the user has rotated or magnified the page then that is lost.
    > > >
    > > > Is there anyway that the content in the iframe is not refreshed? Any
    > > > other ideas to maintain the state of the pdf file.?
    > > >
    > > > Thanks a lot!
    > > >
    > > > Fred
    Steve C. Orr, MCSD, Aug 12, 2003
    #9
  10. Fred

    Fred Guest

    Right, but the problem is that my pagemain.aspx has a datalist which
    contains hyperlinks. This datalist is my navigation bar. So if someone
    clicks on a hyperlink http://server/site/nextpage.aspx, only
    pagemain.aspx would navigate to the nextpage.aspx. What I want to do
    is to replace the entire frameset with nextpage.aspx. Is there anyway
    to do that? Any ideas?

    Thanks a lot!

    Fred


    "Steve C. Orr, MCSD" <> wrote in message news:<#$>...
    > The way most people would probably do it is to have a frameset with 3 frames
    > containing: Pagemain, Page1, Page2
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    > Developer for Hire
    >
    >
    > "Fred" <> wrote in message
    > news:...
    > > Thanks for all the replies. I feel that at this time without learning
    > > a lot, doing it the frames way would be fastest. I need some help with
    > > that.
    > >
    > > Can I have an aspx page with some components on it and at the sametime
    > > have a frameset with two frames inside of it? e.g. have pagemain.aspx
    > > with a datalist on it and also have a frameset with two frames: frameA
    > > (containing page1.aspx) and frameB (containing page2.aspx) in it.
    > >
    > > Thanks,
    > >
    > > Fred
    > >
    > > "Steve C. Orr, MCSD" <> wrote in message

    > news:<>...
    > > > I'd suggest using regular frames instead of an IFrame.
    > > > That way each frame posts back independently - one is not embedded

    > within
    > > > the other so you won't have this problem.
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > http://Steve.Orr.net
    > > >
    > > >
    > > > "Fred" <> wrote in message
    > > > news:...
    > > > > I have an aspx page: Main.aspx which has several components that cause
    > > > > a postback. In the page Main.aspx I also have an iframe which contains
    > > > > a multi-page pdf file.
    > > > >
    > > > > The problem I am facing is that whenever the user does an action which
    > > > > causes a postback on the main page Main.aspx, the page posts back and
    > > > > the pdf file in the iframe is reloaded. This is a problem becuase if
    > > > > the user has rotated or magnified the page then that is lost.
    > > > >
    > > > > Is there anyway that the content in the iframe is not refreshed? Any
    > > > > other ideas to maintain the state of the pdf file.?
    > > > >
    > > > > Thanks a lot!
    > > > >
    > > > > Fred
    Fred, Aug 13, 2003
    #10
  11. Just set the target attribute of your hyperlink to target="_top"

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Fred" <> wrote in message
    news:...
    > Right, but the problem is that my pagemain.aspx has a datalist which
    > contains hyperlinks. This datalist is my navigation bar. So if someone
    > clicks on a hyperlink http://server/site/nextpage.aspx, only
    > pagemain.aspx would navigate to the nextpage.aspx. What I want to do
    > is to replace the entire frameset with nextpage.aspx. Is there anyway
    > to do that? Any ideas?
    >
    > Thanks a lot!
    >
    > Fred
    >
    >
    > "Steve C. Orr, MCSD" <> wrote in message

    news:<#$>...
    > > The way most people would probably do it is to have a frameset with 3

    frames
    > > containing: Pagemain, Page1, Page2
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > http://Steve.Orr.net
    > > Developer for Hire
    > >
    > >
    > > "Fred" <> wrote in message
    > > news:...
    > > > Thanks for all the replies. I feel that at this time without learning
    > > > a lot, doing it the frames way would be fastest. I need some help with
    > > > that.
    > > >
    > > > Can I have an aspx page with some components on it and at the sametime
    > > > have a frameset with two frames inside of it? e.g. have pagemain.aspx
    > > > with a datalist on it and also have a frameset with two frames: frameA
    > > > (containing page1.aspx) and frameB (containing page2.aspx) in it.
    > > >
    > > > Thanks,
    > > >
    > > > Fred
    > > >
    > > > "Steve C. Orr, MCSD" <> wrote in message

    > > news:<>...
    > > > > I'd suggest using regular frames instead of an IFrame.
    > > > > That way each frame posts back independently - one is not embedded

    > > within
    > > > > the other so you won't have this problem.
    > > > >
    > > > > --
    > > > > I hope this helps,
    > > > > Steve C. Orr, MCSD
    > > > > http://Steve.Orr.net
    > > > >
    > > > >
    > > > > "Fred" <> wrote in message
    > > > > news:...
    > > > > > I have an aspx page: Main.aspx which has several components that

    cause
    > > > > > a postback. In the page Main.aspx I also have an iframe which

    contains
    > > > > > a multi-page pdf file.
    > > > > >
    > > > > > The problem I am facing is that whenever the user does an action

    which
    > > > > > causes a postback on the main page Main.aspx, the page posts back

    and
    > > > > > the pdf file in the iframe is reloaded. This is a problem becuase

    if
    > > > > > the user has rotated or magnified the page then that is lost.
    > > > > >
    > > > > > Is there anyway that the content in the iframe is not refreshed?

    Any
    > > > > > other ideas to maintain the state of the pdf file.?
    > > > > >
    > > > > > Thanks a lot!
    > > > > >
    > > > > > Fred
    Steve C. Orr, MCSD, Aug 13, 2003
    #11
  12. Fred

    Fred Guest

    Thanks for help. I have another question if you could help with that:

    In my application I have a page: Pagefirst.aspx

    In the second page: Pagesecond.aspx I have a frameset containing three
    frames: top with src=top.aspx, bottomleft with src=bottomleft.aspx and
    bottomright with src=bottomright.aspx.

    From the Pagefirst.aspx the user clicks on a hyper
    link-http://server/application/Pagesecond.aspx?OrderId=123

    I want to pass the parameters of the query string to each of the pages
    transparently at the time when user clicks on the hyperlink. So that
    each of the pages are loaded with:
    top.aspx?OrderId=123
    bottomleft.aspx?OrderId=123
    and
    bottomright.aspx?OrderId=123

    Is there any way to do this?

    Thanks,

    Fred


    "Steve C. Orr, MCSD" <> wrote in message news:<>...
    > Just set the target attribute of your hyperlink to target="_top"
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    > Developer for Hire
    Fred, Aug 18, 2003
    #12
    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. John M
    Replies:
    1
    Views:
    1,136
    Kumar Reddi
    May 29, 2005
  2. moondaddy
    Replies:
    4
    Views:
    1,146
    Steven Cheng[MSFT]
    Sep 13, 2007
  3. Daedalous
    Replies:
    3
    Views:
    684
    Daedalous
    Jan 16, 2004
  4. Paul
    Replies:
    3
    Views:
    139
  5. BerlinBrown
    Replies:
    5
    Views:
    337
    BerlinBrown
    Feb 5, 2008
Loading...

Share This Page