473,388 Members | 1,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 <%@ PreviousPageType
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
Jun 27 '08 #1
2 2367
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
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:33**********************************@microsof t.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 <%@
PreviousPageType
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

Jun 27 '08 #2
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
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:33**********************************@microsof t.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 <%@
PreviousPageType
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


Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus...
16
by: PromisedOyster | last post by:
Hi I have a situation where I want to use circular referencing. I have cut down the example for demonstration purposes. Say we have one executable (main.exe) and two DLLS (A1.dll and A2.dll)....
8
by: Jeff Connelly | last post by:
We're getting this error and don't know where to find the problem. I assume this is usually issued in the typical case where project A has a reference to project B, and project B has a reference...
6
by: Stephen Robertson | last post by:
We are currently in a dead end with a circular reference issue using vb.net, and are hoping someone might help us resolve it. Idea... We have frmmain calling frmperson (dim f as new frmperson)...
3
by: Solution Seeker | last post by:
Hi All, I am here with a Query and need a Solution for it. The Query is as Follows, We have 3 Projects in a Solution - Say UI, CMN and PRD First One Deals with UI Forms Second One Deals...
0
by: Alan Samet | last post by:
Before telling me what I already know about what this error means, please read the post. I encountered this bizarre error when running aspnet_compiler.exe. Unfortunately, I don't know of a way...
10
by: Richard Lewis Haggard | last post by:
I've created in form that has tab controls that contain tab controls that host user controls on each tab page. It compiles and runs just fine but the designer view fails with a "A circular control...
4
by: Hakan ÖRNEK | last post by:
Hi, I have two dll's like First.dll and Second.dll compiled by vb.net, a object in first.dll and, b object in Second.dll. I need hold cross referances; a.breferance=b and b.areferance=a I...
3
by: =?Utf-8?B?UGF1bCBIYWxl?= | last post by:
Moving all User Controls to a single directory has solved my problem - Thanks Eliyahu. That said, I still got one Circular ref error yesterday, rebuilt again and the build was fine? Far far...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.