Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / November 2007

Tip: Looking for answers? Try searching our database.

Cross Post Pages from Code Behind File

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CSINVA - 07 Nov 2007 17:37 GMT
Trying to figure out how to do a cross post page within the code
behind file.  I need to do some calculations before I send a string
value to another pages.  Here is an example of the concept I would
like to achieve.

Lets start with 2 pages, page1.aspx has the text boxes and page2 is
where I want to display the informaiton.

Page1.aspx

textBox1.text = "John"

textBox 2.text = "Smith"

In my page1.aspx.vb page I have something like

Dim full as string
full = textBox1.text & " " & textBox2.text

Dim url as string = http://localhost/page2.aspx

Page.Response.Redirect(Url)

On page2.aspx all I want to do is display "full" on the page.

Your Full Name: "full"

I have looked at the page.previous.findcontrol but since this is all
done within the code behind file I don't have a control.  I need to
beable to instead of findcontrol findvariable("full"), but don't know
how to accomplish that.
IfThenElse - 07 Nov 2007 18:00 GMT
If you can use  Server.Transfer("page2.aspx");   instead off
response.redirect(.....

Dim full as string
full = textBox1.text & " " & textBox2.text
Context.Items.Add("full", full)

Server.Transfer("page2.aspx")

On page2.aspx.

Dim full as string

full = Context.Items("full").ToString()

Response.Write(full)  ' etc...

> Trying to figure out how to do a cross post page within the code
> behind file.  I need to do some calculations before I send a string
[quoted text clipped - 27 lines]
> beable to instead of findcontrol findvariable("full"), but don't know
> how to accomplish that.
CSINVA - 07 Nov 2007 19:03 GMT
> If you can use  Server.Transfer("page2.aspx");   instead off
> response.redirect(.....
[quoted text clipped - 46 lines]
>
> - Show quoted text -

Need it to be able to use it with browsers other than IE.
IfThenElse - 07 Nov 2007 19:26 GMT
pass in URL string ,  Encrypted if you wish
you may pass it in cookie

Are you crossing domains or servers?

Server.Transfer can work for all browsers.

>> If you can use  Server.Transfer("page2.aspx");   instead off
>> response.redirect(.....
[quoted text clipped - 48 lines]
>
> Need it to be able to use it with browsers other than IE.
CSINVA - 07 Nov 2007 22:22 GMT
>  pass in URL string ,  Encrypted if you wish
> you may pass it in cookie
[quoted text clipped - 61 lines]
>
> - Show quoted text -

I was reading something else.  The only problem is that I need for
page2 to look like it is coming from page2.aspx and not page1.

For instance.  chris.mysite.com/page1.aspx   send data to page2 -->
(response.redirect) www.mysite.com/page2. with full on the page.

I have to do it this way because I actually have page 2 just doing a
redirect to the "full" item in the example.  And the receive site will
only accept connections from a specific site and web page.  It's a
pain, but getting closer.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.