Help?? The page cannot be refreshed without resending ...

B

Bill Cohagan

I'm constructing an ASP app with a frameset on the home html page. From
frame A I need to referesh the page in frame B when a button click occurs on
a button in Frame A (server side event handler).

To accomplish this I've included some client side script in the page being
built in frame A such that whenever it is received by the browser it reloads
frame B's page. The problem is that (sometimes) this sequence of events
produces a dialog box with the message:

"The page cannot be refreshed without resending ..."

This happens when web controls on page B have been changed; i.e., there is
some viewstate, but if these controls haven't changed before then I don't
get this message. The controls in question are DropDown controls and they
have their AutoPostBack set to true.

Can anyone explain why this dialog appears and what I might do to avoid
having it appear?

Thanks in advance,
Bill
 
6

620

Bill Cohagan said:
The controls in question are DropDown controls and they
have their AutoPostBack set to true.

That's the key to your problem, altho really what you are experiencing is
probably considered to be "by design".

Let's say you perform a postback on page x, such as the user is doing when
they modify a dropdown in frame B. When the result comes back, the browser
no longer sees that page as 'page x', it sees it as 'special content I got
by submitting [this form data] to page x'.

Now if you hit 'refresh', the browser has a problem. It doesn't think it's
looking at a page, it things it's looking at some special content that can
only be created by submitting [this form data] to page x. And the only way
the browser knows how to 'refresh dynamic content I got by submitting [this
form data] to page x' is to re-submit [this form data] to page x.

If the message were painfully verbose, it might say something like, "I'll
refresh this for you, but just so you know... this page was actually the
result of submitting form data to some page, so the only way I can really
'refresh' it is to re-submit the original form data to that page again...
ok?" And it asks you because, in theory, by now your session variables
might be different, server variables might be different, and the result
*might not* really come out the same this time. So it's kind of warning you
that it's about to do something potentially funky.

I dunno how you can get a client to supress this message, other than simply
avoiding it all together by ensuring you don't attempt to 'refresh' the
result of a postback.

But my question is, why refresh frame B?
 
B

Bill Cohagan

Thanks for the quick response. In answer to your question, why refresh B?,
I'm using frame A to contain a grid used as a "picklist". Clicking the Add
button for an item (row) in that grid adds it to a grid in the B frame; thus
the need to reload B's page from the page in A. I'm using two frames because
there are other activities in the A frame and (also) I want to be able to
scroll frame A independent of frame B. Perhaps there's a better way to do
this and I'm certainly open to suggestions. I'm pretty much in the learning
stages on ASP.Net (and HTML to a certain extent.)

Thanks again,
Bill

620 said:
Bill Cohagan said:
The controls in question are DropDown controls and they
have their AutoPostBack set to true.>
[snip]
But my question is, why refresh frame B?
 
J

Jacob Yang [MSFT]

Hi Bill,

I am interested in this issue and researching on it now. I will update you
as soon as possible.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top