Hi @Mathew James,
I am not receiving the posted data. Always I get null in test1. Please let me know whether I am missing anything ?
I tested your code and found that the problem is with the Friendly URLs. You can try the following two methods:
- Update the form's action to remove the file extension
<form id="form1" method="post" action="statusdisplay" >
- Amend the configuration for Friendly URLs You will find this in the RouteConfig.cs file in the App_Start folder. The configuration to change is the AutoRedirect mode which by default is set to RedirectMode.Permanent.
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
//settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
}
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.