Pass control from controller to view

  1. #1

    [SOLVED] Pass control from controller to view

    I have a ASP.NET MVC web site.
    In the controller folder I have the file PianoFerieOreMeseController.cs where in one method i put the following code :

        if (cpfs!=null)
                    {
                        List<PianoFerieOreMeseModel> model = new List<PianoFerieOreMeseModel>();
                        PopolaModel(model,cpfs);
    
                        return View ("/PianoFerieOreMese/Index", model );
                    }
    In the View folder I have a folder named PianoFerieOreMese with into a file Index.cshtml.
    What is the error because the redirection not work ?
    Thanks
    Simone
    Last edited by simonespagna; Oct 15, 2014 at 1:11 PM.
  2. #2

    [SOLVED] Pass control from controller to view

    I've solved the issue using this code in the html css :
      directEvents.Command.Url = "/PianoFerieOreMese";
      directEvents.Command.Action = "";
    Command.Url is the solution of my problem.
    Thanks to all guys,
    Simone

Similar Threads

  1. [CLOSED] Pass TreePanel to Controller - MVC
    By Z in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 06, 2014, 2:50 AM
  2. Grid view data to the controller
    By chinninani in forum 2.x Help
    Replies: 0
    Last Post: May 16, 2013, 12:01 PM
  3. Replies: 1
    Last Post: Mar 22, 2013, 2:47 AM
  4. Replies: 1
    Last Post: Nov 16, 2012, 4:26 PM
  5. MVC Add Controller / Strongly Typed View Bug
    By Doug.Morrow in forum 2.x Help
    Replies: 0
    Last Post: Aug 08, 2012, 10:03 PM

Tags for this Thread

Posting Permissions