This project is read-only.

How to show file index

Jun 21, 2010 at 11:04 PM

Hi,

How do I show file index?

Do I use sparks? or should I create my own module for it?

If module way, how do I do it? I'm new to c#, but I made the samples work.

 

Thanks

Jun 22, 2010 at 6:03 AM
Edited Jun 22, 2010 at 6:05 AM

In your controller, set DefaultMethod (v1.1) or DefaultAction (v2.0) to a method name in your constructor.

 

 

public class UserController : Controller
{
  public UserController()
  {
     DefaultAction = "List";
  }

  public IActionResult View() 
  {
  }

  public IActionResult List()
  {
  }
}

If I remember correctly, just name a method Index and it will be used Automatically (as long as it is public and return IViewData or IActionResult).

 

Jun 22, 2010 at 6:18 AM
Edited Jun 22, 2010 at 3:38 PM

Thanks. I already implemented my own way that works on how ill use it.
Ive learned alot since this post. Ty

On 6/21/10, jgauffin <notifications@codeplex.com> wrote:
> From: jgauffin
>
> In your controller, set DefaultMethod (v1.1) or DefaultAction (v2.0) to a
> method name in your constructor. public class UserController : Controller{
> public UserController() { DefaultAction = "List"; } public
> IActionResult View() { } public IActionResult List() { }}
>
>