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

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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.
    KathyB Guest

  2. Similar Questions and Discussions

    1. Transfer DataGrid across frames
      Hello everyone Is there a way to click on a button on one frame and have it populate a datagrid on another frame on the same page?
    2. Please tell me I'm crazy!!! - Reload page does not update textbox values.
      Scenario: 1. I dynamically generate a form (using server-side code) with numerous text boxes that are populated with values from a database. ...
    3. Server.Transfer loses posted values only v1.1
      The only suggestion I can throw, without some testing, is to check the values for ViewState and ViewStateMac, as ViewState is where the values...
    4. Server.Transfer loses posted values
      I have an ASP.NET application that is working under v1.0 of the framework but is not working under v1.1. The application uses logical addresses...
    5. How come SERVER.TRANSFER when used in a table only displays the new page in that particular cell?
      That must be because you have "second_document.asp" in your page somewhere in the html. Server.Transfer is like response.redirect, except it...
  3. #2

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

    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" <KathyBurke40@attbi.com> schrieb im Newsbeitrag news:75e8d381.0306300847.60a2ee6c@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.
    Axel Dahmen Guest

  4. #3

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

    Thanks Axel,

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

    KathyBurke

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Kathy Burke Guest

  5. #4

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

    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" <kathyburke40@attbi.com> schrieb im Newsbeitrag news:#oqwUxzPDHA.4024@tk2msftngp13.phx.gbl...
    > Thanks Axel,
    >
    > Could you possibly give me a brief example...?
    >
    > KathyBurke
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    Axel Dahmen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139