Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
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
 
Old June 13th, 2007, 10:32 AM
Registered User
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old June 14th, 2007, 01:57 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

will you please tell you are using .net1.1 or 2.0


thanks......
 
Old June 14th, 2007, 11:32 AM
Registered User
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using the 2.0 framework

 
Old June 14th, 2007, 04:16 PM
Registered User
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old June 14th, 2007, 04:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 17th, 2007, 03:30 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 18th, 2007, 09:00 AM
Registered User
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

still looking into it, Imar. I wear many hats these days....

 
Old June 18th, 2007, 10:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 19th, 2007, 07:41 AM
Registered User
 
Join Date: Jun 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

 
Old June 19th, 2007, 12:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
How to get previous date? rupen Javascript How-To 1 June 26th, 2006 10:57 PM
Subtracting a value from a previous value Wes Access 8 March 29th, 2006 12:17 PM
Web pages constructing: I-mode(mobile) pages karib Dreamweaver (all versions) 3 June 6th, 2004 09:48 AM
Move Next, Previous, First and Last nvillare Classic ASP Basics 1 August 1st, 2003 04:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.