I have a web form that I am attempting to implement dynamic drop down lists on using the .NET AJAX 1.0 extensions. I have successfully implemented the needed bits, but have an interesting quirk.
When I select a value from my first drop down list, my call back happens and my page is updated correctly. The next value I select, I receive the following error:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned was: 404
Reguarless of what control I use first, the first request works and the second does not. Looking at my IIS logs, I see the following lines:
2008-10-17 14:52:14 W3SVC1 127.0.0.1 POST /Aware/Xtend/mParticipant/NewPlannedService.aspx WIN=Participant_1224255079212&Title=Participant 80 - 127.0.0.1 200 0 0
2008-10-17 14:52:20 W3SVC1 127.0.0.1 POST /Aware/mParticipant/NewPlannedService.aspx WIN=Participant_1224255079212&Title=Participant 80 - 127.0.0.1 404 0 0
As you can see my post URL has completely changed. Using Fiddler to watch the request/response, I can see this in the response from the server:
|formAction||NewPlannedService.aspx|
This is simply the name of the page that is being executed, the relative path and query string has been dropped off.
I can resolve this issue by adding the following to the end of my Async callback method:
this.Form1.Action = Request.Url.PathAndQuery
But this seems incredibly lame and smells somewhat like moldy cheese to me. Can any one point me in the right direction?
UPDATE: Upon further inspection I discovered that NewPlannedService.aspx was not the original executing page. Page1.aspx was executing and then called Server.Transfer("/folder/NewPlannedService.aspx"). So the URI in the browser was http://whatever.com/Page1.aspx, but the actual page that was executing was http://whatever.com/folder/NewPlannedService.aspx