 |
| ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 13th, 2007, 10:32 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CrossPostBack from two previous pages?
Is it possible to code a target page to have more than one source page? I am a fairly new developer; this is my first real project outside of school.
I have a home (source) page that can go to one of two pages, depending on if the user chooses an item in a GridView, or uses the search function instead. I have the target page set up to crosspost information when the user chooses an item in the GridView. If the user searches, the results are displayed on a different page. I want to enable that page to cross post to the second (target) page, if the user chooses, as well. So I have two source pages that I want to cross post to one target page.
When I try to use more than one virtual path on the target page PreviousPageType, I get an error. And the target class does not recognize the second source page I am trying to cross post from.
I can post the code if you wish, although there is quite a bit, even with the formatting etc. removed.
|
|

June 14th, 2007, 01:57 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
|
|
will you please tell you are using .net1.1 or 2.0
thanks......
|
|

June 14th, 2007, 11:32 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm using the 2.0 framework
|
|

June 14th, 2007, 04:16 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
If people are reading this, but don't know, can y'all just say you don't know? Or, that you are looking into it?
|
|

June 14th, 2007, 04:35 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Then what? Get 257 replies in your (and mine) mail box with "Dunno" type of answers?
It can be done though; in fact, the target page is usually unaware of the previous page. So, all you need to do is give the source pages shared behavior and make the target page aware of that. The best way to do this is through an interface where the interface (applied to the source pages) exposes some common properties that both source pages implement so you can access those in the target page. Take a look here for a nice example: http://www.odetocode.com/Articles/421.aspx
However, do you really need cross page postbacks? Can't this be resolved with plain query strings or Redirect / Transfer?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

June 17th, 2007, 03:30 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
quote:If people are reading this, but don't know, can y'all just say you don't know? Or, that you are looking into it?
|
If the OP is reading this, can you just say "it works" or "it doesn't work"? Or, that you are looking into it? ;)
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

June 18th, 2007, 09:00 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
still looking into it, Imar. I wear many hats these days....
|
|

June 18th, 2007, 10:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No problem. I normally don't post follow-up mails like this, but given your original request for feedback, I felt it was appropriate. Must be my type of humor (or lack thereof) ;)
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|

June 19th, 2007, 07:41 AM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well, I am using VB.NET not C#, and I don't know C# so I tried to translate it myself and am not doing such a good job. Do you know any free online translators that work well?
|
|

June 19th, 2007, 12:16 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
There used to be a good one at www.dotnettaxi.com but it's been down for quite some time. Not sure if it will be back up some day.
I don't often have the need to translate large blocks of code from one language to another, so I usually convert it by hand. Are there any specific things you need help with?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|
|
 |