467,906 Members | 1,590 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,906 developers. It's quick & easy.

server.transfer to reload PARENT page (contains frames) -- how to retain values?

Hi,

Been reading a LOT about frames, variables, etc. I realize you can NOT
use server.transfer with target frames (which are client)...

I have a Parent frame containing Left and Right frames. IS IT POSSIBLE
(and HOW please) to do the following:

4 text controls filled in by user in Left frame, with a button click
event to:

Reload Parent frame containing: reload Left frame keeping (or
replacing) its .text values and load a new Right frame, loading an
xmlDocument (source filename is needed from a text value in Left
frame).

Any EXAMPLES very appreciated...or can I simply NOT do this?

Thanks, Kathy

p.s. I know there is a lot of opinion AGAINST frames, but that is not
an option for me just now...thanks.
Nov 17 '05 #1
  • viewed: 6212
Share:
3 Replies
You might want to use dynamically created client script in your left frame to reload the whole window after postback. You can build a query string on postback to forward to the other frames.

HTH,
Axel Dahmen

------------------------
"KathyB" <Ka**********@attbi.com> schrieb im Newsbeitrag news:75**************************@posting.google.c om...
Hi,

Been reading a LOT about frames, variables, etc. I realize you can NOT
use server.transfer with target frames (which are client)...

I have a Parent frame containing Left and Right frames. IS IT POSSIBLE
(and HOW please) to do the following:

4 text controls filled in by user in Left frame, with a button click
event to:

Reload Parent frame containing: reload Left frame keeping (or
replacing) its .text values and load a new Right frame, loading an
xmlDocument (source filename is needed from a text value in Left
frame).

Any EXAMPLES very appreciated...or can I simply NOT do this?

Thanks, Kathy

p.s. I know there is a lot of opinion AGAINST frames, but that is not
an option for me just now...thanks.


Nov 17 '05 #2
Thanks Axel,

Could you possibly give me a brief example...?

KathyBurke

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
There are many ways to do that. One would be to add the "onload" event to the left frame's body tag:

HtmlGenericControl bodyCtrl;

void Page_Load()
{
...

if (IsPostBack)
{
...

string query="";

query+="var1="+HttpUtility.URLEncode(myTxtBox1.Tex t);
query+="&var2="+HttpUtility.URLEncode(myTxtBox2.Te xt);
query+="&var3="+HttpUtility.URLEncode(myTxtBox3.Te xt);
query+="&var4="+HttpUtility.URLEncode(myTxtBox4.Te xt);

bodyCtrl.Attributes.Add("onload","top.location='Ou terFrame.aspx?"+query+"'")
}

...
}

The body element of your left frame must of course have a RunAt="Server" attribute:

<body Runat="Server" id="bodyCtrl">
In your outer frame file then, you forward the query string to the right frame... I guess you know how to create hyperlinks (or any text) dynamically?

HTH,
Axel Dahmen

-------------------------
"Kathy Burke" <ka**********@attbi.com> schrieb im Newsbeitrag news:#o**************@tk2msftngp13.phx.gbl...
Thanks Axel,

Could you possibly give me a brief example...?

KathyBurke

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Bryan Field-Elliot | last post: by
3 posts views Thread by Guy Roydor | last post: by
19 posts views Thread by Darren | last post: by
3 posts views Thread by Justin | last post: by
3 posts views Thread by Ohad Young | last post: by
2 posts views Thread by Chris Podmore | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.