circular reference in cross page post back

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=

    circular reference in cross page post back

    I'm reying to get around the problem of cross page post back. I'm attempting
    to use an interface to cast the previous page.
    if (PreviousPage != null)
    {
    ICommonPostback frm = PreviousPage as ICommonPostback ;
    ...
    ...
    Previous page exists, but after casting frm is still null. I'm hoping this
    will work. If i reference this page directly using the <%@ PreviousPageTyp e
    VirtualPath="~/Admin/ItemMaster.aspx " %i get a circular reference.

    --
    (i''ll be asking a lot of these, but I find C# totally way cooler than vb
    and there''s no go''n back!!!)
    thanks (as always)

    kes
  • Teemu Keiski

    #2
    Re: circular reference in cross page post back

    Are you doing cross-page postback to the same page if you'd get circular
    reference?

    Only way the cast succeeds is that the previous page really implements the
    interface.


    --
    Teemu Keiski
    AspInsider, ASP.NET MVP




    "WebBuilder 451" <WebBuilder451@ discussions.mic rosoft.comwrote in message
    news:33B295DC-6C9F-4AEF-8508-10B52E342590@mi crosoft.com...
    I'm reying to get around the problem of cross page post back. I'm
    attempting
    to use an interface to cast the previous page.
    if (PreviousPage != null)
    {
    ICommonPostback frm = PreviousPage as ICommonPostback ;
    ...
    ...
    Previous page exists, but after casting frm is still null. I'm hoping this
    will work. If i reference this page directly using the <%@
    PreviousPageTyp e
    VirtualPath="~/Admin/ItemMaster.aspx " %i get a circular reference.
    >
    --
    (i''ll be asking a lot of these, but I find C# totally way cooler than vb
    and there''s no go''n back!!!)
    thanks (as always)
    >
    kes

    Comment

    • =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=

      #3
      Re: circular reference in cross page post back

      Thanks for replying.
      I ended up using an Interface. The problem was that both pages refered to
      each other. I was suprised that so little was written about this on the web.
      I even posted my results so that other could benifit. It's a humble effort,
      but i hope it will help some.
      --
      (i''ll be asking a lot of these, but I find C# totally way cooler than vb
      and there''s no go''n back!!!)
      thanks (as always)

      kes


      "Teemu Keiski" wrote:
      Are you doing cross-page postback to the same page if you'd get circular
      reference?
      >
      Only way the cast succeeds is that the previous page really implements the
      interface.
      >
      >
      --
      Teemu Keiski
      AspInsider, ASP.NET MVP


      >
      >
      "WebBuilder 451" <WebBuilder451@ discussions.mic rosoft.comwrote in message
      news:33B295DC-6C9F-4AEF-8508-10B52E342590@mi crosoft.com...
      I'm reying to get around the problem of cross page post back. I'm
      attempting
      to use an interface to cast the previous page.
      if (PreviousPage != null)
      {
      ICommonPostback frm = PreviousPage as ICommonPostback ;
      ...
      ...
      Previous page exists, but after casting frm is still null. I'm hoping this
      will work. If i reference this page directly using the <%@
      PreviousPageTyp e
      VirtualPath="~/Admin/ItemMaster.aspx " %i get a circular reference.

      --
      (i''ll be asking a lot of these, but I find C# totally way cooler than vb
      and there''s no go''n back!!!)
      thanks (as always)

      kes
      >
      >
      >

      Comment

      Working...