Last post Jan 23, 2021 06:03 PM by bruce (sqlwork.com)
Jan 22, 2021 06:18 PM|RDesh|LINK
I had built an app in asp.net C# web forms. And recently have been asked to add more enhancements to it. Can I build the new pages using MVC, while letting the earlier work remain unchanged? Is there a major challenge in doing that?
Jan 22, 2021 06:38 PM|bruce (sqlwork.com)|LINK
no, they work together. it must be a webforms project, not site. It might be easier to generate a new MVC project and add the webforms code to it.
Jan 22, 2021 10:05 PM|SurferOnWww|LINK
How about developing new MVC project and deploying it under the existing Web Forms site as a application?
Jan 23, 2021 02:23 AM|RDesh|LINK
Yes, I build a new WebForms project with MVC, and copied the aspx files to this project. While running this, the ajax call to one of the webmethods is failing on this new project. It seems to not find the url, and Developer Tools says:
jquery-3.5.1.js:10099 POST http://localhost:1163/FindEmployee.aspx/Bindemployeetable 404 (Not Found)
send @ jquery-3.5.1.js:10099
ajax @ jquery-3.5.1.js:9682
SearchEmp @ FindEmployee:267
(anonymous) @ FindEmployee:437
dispatch @ jquery-3.5.1.js:5429
elemData.handle @ jquery-3.5.1.js:5233
Bindemployeetable is the web method calling. I made sure jquery-3.5.1.js is there where it is supposed to look. Is there something that jumps out that I am missing?
Jan 23, 2021 06:03 PM|bruce (sqlwork.com)|LINK
sound like routing is not setup correctly. try this lab to get sample code: