سؤال

My project was working fine till yesterday and today I renamed the namespace from OnlineShoppingSystemMVC to OnlineShoppingSystemMvc

And then I changed the markup of Global.asax I changed

<%@ Application 
Codebehind="Global.asax.cs"
Inherits="OnlineShoppingSystemMvc.MvcApplication" 
Language="C#" %>

But still resource cannot found error is thrown when I debug the application.

Please help me out in solving this issue.

هل كانت مفيدة؟

المحلول

You have to rename all

@model OnlineShoppingSystemMVC.YourModelsFolder.YourModel

to

@model OnlineShoppingSystemMvc.YourModelsFolder.YourModel in all your View files

Right now I did what you did before (I renamed the namespace of one of my projects (ctrl+ R)) and all the namespaces was renamed but the models' namespaces in my Views didn't changed.

نصائح أخرى

I find solution for your issue:

My project name is WebApplication1 after this rename it to WebApplication3 .

I was  change  this line in aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" **Inherits="WebApplication3.test"** %>
I done changes also in AssemblyInfo.cs :
**[assembly: AssemblyTitle("WebApplication3")]**
and **[assembly: AssemblyProduct("WebApplication3")]**

and also change in test.aspx.cs:

**namespace WebApplication3**

after this running project it works absolutely fine.
Hope it will help you
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top