0

i got stack on my project the problem is after adding new controller class and views for the actions unable to link the views with existing views *

The resource cannot be found

.* i have home and account controller classes which work well and i add new controller class users and i have to action methods index and adduser both have view but anytime when i try to retrieve view from the new controller class it dosnt found the pages. eg <%= Html.ActionLink("users", "Index", "users")%> please help !!!

2
  • 1
    You're going to need to provide more information. Commented Mar 24, 2012 at 7:33
  • +1. I think it should be mandatory to post some of the code for those who have rep<1000 Commented Mar 24, 2012 at 7:38

1 Answer 1

1

have you created views?

Guideline:

  1. create controller controller_nameController
  2. create action public actionresult action_name(){return View();}
  3. create views Hit ctrl+m, ctrl+v or right click on the action whose view you would like to create.

enter image description here 4. check if you really have created a view named action_name in controller_name folder

enter image description here

Then you can create links: ("to display text", "action name", "controller name")

Hope this helps.

Sign up to request clarification or add additional context in comments.

5 Comments

yeah i created both the action and the controller i.e Index view and Index action name on users controller
@TeddyTeddy - is it called UsersController? or just Users?
ControllerName in asp.net mvc follows this simple rule: ControllerNameController. e.g. Users controller should be named: UsersController
@Anubhav Saini Userscontroller
@TeddyTeddy what? if your View Folder Name is Users, your controller name is UsersController! what are you asking?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.