Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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 !!!

share|improve this question
1  
You're going to need to provide more information. –  Erik Funkenbusch Mar 24 '12 at 7:33
    
+1. I think it should be mandatory to post some of the code for those who have rep<1000 –  Anubhav Saini Mar 24 '12 at 7:38

1 Answer 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.

share|improve this answer
    
yeah i created both the action and the controller i.e Index view and Index action name on users controller –  Teddy Teddy Mar 24 '12 at 7:53
    
@TeddyTeddy - is it called UsersController? or just Users? –  Erik Funkenbusch Mar 24 '12 at 9:25
    
ControllerName in asp.net mvc follows this simple rule: ControllerNameController. e.g. Users controller should be named: UsersController –  Anubhav Saini Mar 24 '12 at 9:45
    
@Anubhav Saini Userscontroller –  Teddy Teddy Mar 24 '12 at 12:39
    
@TeddyTeddy what? if your View Folder Name is Users, your controller name is UsersController! what are you asking? –  Anubhav Saini Mar 24 '12 at 12:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.