Sunix Posted April 17, 2019 Share Posted April 17, 2019 Hi! The tutorial ASP.NET Web Pages - HTML Forms does not work in Visual Studio 2019. IsPost gets error and Request[""] too. How to solve this? Link to comment Share on other sites More sharing options...
Funce Posted April 17, 2019 Share Posted April 17, 2019 Hi there, do you know which version of ASP.NET you're using? The tutorials use a specific version, details below: On 4/11/2019 at 9:19 AM, Funce said: I just had a poke around. The tutorials use ASP.NET Web Pages 3.2 apparently. Instead of ifPost (which looks like its erroring too) try if (HttpMethods.IsPost(Request.Method)) In terms of the Request stuff, try something like this var num1 = Request.Form["text1"]; var num2 = Request.Form["text2"]; Link to comment Share on other sites More sharing options...
Sunix Posted April 18, 2019 Author Share Posted April 18, 2019 Target framework: .net core 2.1 Link to comment Share on other sites More sharing options...
Funce Posted April 22, 2019 Share Posted April 22, 2019 Ouch, Yeah you'll need to be careful here. Make sure you check out the documentation surrounding both ASP.NET Web Pages 3.2, and ASP.NET Core 2.1 but otherwise, my quoted answer will work for you, as that was in reference to asp.net core 2.1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now