Search code examples
buttonteleriktelerik-mvcmouseclick-event

Mvc Telerik Button Event


I want to navigate to another action NewPage in Home Controller when somebody click on the following button.

<input class="t-button AlignButton" type="button" value="New" />

What would be the code for performing this action. Thanks in advance.


Solution

  • It might be better to use an ActionLink.

    @Html.ActionLink("New", "NewPage", "Home")
    

    If you want it to look like a button, you can add css properties.

    @Html.ActionLink("New", "NewPage", "Home", new { @class="newpage" })
    

    In the css, you can define what you want the link to look like including using an image.