I just had this scenario, when I would add whatever action control on a page and set its PostBackUrl property to another page. I would do this because I wanted to send some data from the current page (more like a view, where you input stuff) to another page via the POST method. However, for some super perculiar reason, I kept missing something, because whenever I would hit the control that did the POST action via the PostBackUrl property setting, the Request.RequestType that was incomming to the destination page was GET instead. Obviously, the Request.Form property didn’t containt any collections from which to extract the expected data from. After loosing precious time around this matter, I just realized that the ASP.NET WebForm template I was building the project upon had the preview of the FriendlyUrls NuGet package installed. What is FriendlyUrls? Basically, it’s a Microsoft signed NuGet package that handles your website in such a manner that your URLs become friendly: e.g. http://localhost/Default.aspx can also be visited through http://localhost/Default (which apparently is friendly). Don’t get me wrong, it’s not that FriendlyUrls has something against Posting via PostBackUrl property. It’s just that the template I was building the project upon had the 1.0.0-alpha1 version of FriendlyUrls installed rather than a final release of the package. After updating the package to its final release, I was able to POST via forms using the PostBackUrl property just fine. Hope this helps other outside there! A.
PostBackUrl not posting in ASP.NET
by Alex Mang ⋅