471,049 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Cross Post Pages from Code Behind File

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.

Nov 7 '07 #1
4 1829
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...



"CSINVA" <mc*************@yahoo.comwrote in message
news:11**********************@o3g2000hsb.googlegro ups.com...
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.

Nov 7 '07 #2
On Nov 7, 1:00 pm, "IfThenElse" <sql_agent...@hotmail.comwrote:
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...

"CSINVA" <mcse_instruc...@yahoo.comwrote in message

news:11**********************@o3g2000hsb.googlegro ups.com...
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.- Hide quoted text -

- Show quoted text -
Need it to be able to use it with browsers other than IE.

Nov 7 '07 #3
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.
"CSINVA" <mc*************@yahoo.comwrote in message
news:11**********************@y42g2000hsy.googlegr oups.com...
On Nov 7, 1:00 pm, "IfThenElse" <sql_agent...@hotmail.comwrote:
>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...

"CSINVA" <mcse_instruc...@yahoo.comwrote in message

news:11**********************@o3g2000hsb.googlegr oups.com...
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.- Hide quoted text -

- Show quoted text -

Need it to be able to use it with browsers other than IE.

Nov 7 '07 #4
On Nov 7, 2:26 pm, "IfThenElse" <sql_agent...@hotmail.comwrote:
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.

"CSINVA" <mcse_instruc...@yahoo.comwrote in message

news:11**********************@y42g2000hsy.googlegr oups.com...
On Nov 7, 1:00 pm, "IfThenElse" <sql_agent...@hotmail.comwrote:
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...
"CSINVA" <mcse_instruc...@yahoo.comwrote in message
>news:11**********************@o3g2000hsb.googlegr oups.com...
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.- Hide quoted text -
- Show quoted text -
Need it to be able to use it with browsers other than IE.- Hide quoted text -

- 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.



Nov 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by draganc | last post: by
12 posts views Thread by Assaf | last post: by
29 posts views Thread by John Rivers | last post: by
15 posts views Thread by CMM | last post: by
9 posts views Thread by Fat Elvis | last post: by

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.