By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,403 Members | 1,567 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,403 IT Pros & Developers. It's quick & easy.

Error executing child request for MyPage.aspx.

P: n/a
I am developing an ASP.NET 2.0 application using a master page. I have a
DataList control on the master page that has a datasource this is an
ArrayList of objects that have a CmdURL property. This property contains a
string that hold the name of the page to which control is redirected, e.g.
MyPage.aspx. In this scenario when the user clicks on the DataList item the
handler either executes a Server.Transfer or a Response.Redirect.

The handler is in the Master page .cs file. This scheme has worked well to
this point, but I am now getting an exception with a message, "Error
executing child request for MyPage.aspx.". What is happening? How can I fix
it?

Note: I have seen the newsgroup entry that says to use Response.Redirect,
but I get the problem with Redirect as well.

Any help is greatly appreciated.

Thanks,
Eagle
May 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I have looked at this in greater detail in the debugger in my exception
handlers. It turns out that I have an ArrayList of objects that is being
used as a data source on a control on the MyPage.aspx. The underlying class
was not marked as serializable. After marking it the problem "went away".
The necessary information was in an inner exception and would not have been
seen in a superficial examination of the exception. Also, it took some
"chasing" through the code in exception handlers in the original page, the
master page and the target page to determine where the exception was being
thrown. It turns out the exception was thrown on the master page.

While I think I know how to avoid this problem in the future by making
classes used as data sources as serializable, I would appreciate comments on
the details of execution of Response.Redirect and Server.Transfer from within
the code-behind of master pages.

Thanks,
Eagle

"Ea******@HighFlyingBirds.com" wrote:
I am developing an ASP.NET 2.0 application using a master page. I have a
DataList control on the master page that has a datasource this is an
ArrayList of objects that have a CmdURL property. This property contains a
string that hold the name of the page to which control is redirected, e.g.
MyPage.aspx. In this scenario when the user clicks on the DataList item the
handler either executes a Server.Transfer or a Response.Redirect.

The handler is in the Master page .cs file. This scheme has worked well to
this point, but I am now getting an exception with a message, "Error
executing child request for MyPage.aspx.". What is happening? How can I fix
it?

Note: I have seen the newsgroup entry that says to use Response.Redirect,
but I get the problem with Redirect as well.

Any help is greatly appreciated.

Thanks,
Eagle

May 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.