Server.Transfer("myPage.aspx") : error executing child request

T

Tim C.

I get the error "error executing child request" when I
use the Server.Transfer method to invoke a second aspx
page. The following code is executed in a LinkButton click
eventhandler on Page1.aspx.

Server.Transfer("Page2.aspx",True)

This code is virtually identical to the examples in
chapter 4 (p. 196) of Microsoft's _Developing Web
Applications_ 2nd edition, by Jeff Web. For what I'm
hoping to accomplish, the Transfer method would work out
better than Response.Redirect().

The two ASPX pages in question are in the same folder. In
the Page directive for Page1.aspx, EnableViewStateMac is
set to "false".

I don't understand why the error. Any help would be
appreciated.

Thanks
 
T

Tommy

You need to set "EnableViewStateMac" to "false" on Page2 instead of
Page1.

By default, "EnableViewStateMac" is "true", and when Page2 loads the
viewstate from Page1, it detected that is is not generated from
itself, and thus return an error.

Tommy,
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top