Reputation: 861
I am building an asp.net app and I keep getting this error while trying to transfer pages:
Error executing child request for Edit_PropertyData.aspx
I have no clue what's causing it or how to fix it, any help would be greatly appreciated!
Here is the Page_Load
event of Edit_PropertyData.aspx
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cmdChangeMaterial.Attributes.Add("onclick", "CheckSaveStatus();")
cmdEditMaterial.Attributes.Add("onclick", "CheckSaveStatus();")
If Session("Mode") Is "Edit" Then
cmdEditMaterial.Enabled = True
cmdSaveData.Enabled = True
Else
cmdEditMaterial.Enabled = False
cmdSaveData.Enabled = False
End If
pnlMain.Visible = True
pnlMain.Height = Unit.Pixel(650)
End Sub
Upvotes: 0
Views: 3997
Reputation: 63732
Server.Transfer
doesn't allow you to do a lot of things. You're probably trying to use it to pass query string parameters or some such. But you don't need that - the URL doesn't change in the target of the transfer, so you've still got the original query string. This can be both a good and a bad thing, depending on how you use it :)
You probably want to use a different transfer method instead - if you're inside a HttpModule
, have a look at HttpContext.Current.RewritePath
.
Upvotes: 2
Reputation: 1414
What have you tried so far? A quick search gives a number of similar error messages with proposed and accepted solutions.
Server.Transfer throws Error executing child request. How to resolve?
http://forums.asp.net/t/1489436.aspx?Server+Transfer+Error+executing+child+request
http://support.microsoft.com/kb/320439
You don't mention what you're transferring from, but I suspect Response.Redirect
or HttpContext.Current.RewritePath
will be a better alternative for you.
Upvotes: 0