I am developing an ASP.Net MVC 3 application using C# and SQL Server 2005.
I would like to create a Jquery event on a button. It's like an accordian animation.
I have already in the template which I used an example and I want to remake it in an another button.
This is a video describing the event.
Sorry, I didn't post any code because I don't find really where is the script of this event.
But, I will edit my post for any demand.
Thanks for understanding :)
this is The view Gestion which I would like to show when I click on the button :
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication2.Models.FlowViewModel>" %>
<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">
Gestion
</asp:Content>
<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
<h2>Gérer</h2>
</asp:Content>
This is a class GestionHelper which I created following the example of the other button :
namespace Helpers
{
public static class GestionHelper
{
public static string GestionLinkHelper(this HtmlHelper helper){
string currentControllerName = (string)helper.ViewContext.RouteData.Values["controller"];
string currentActionName = (string)helper.ViewContext.RouteData.Values["action"];
var sb = new StringBuilder();
sb.Append("<div id=\"gestionlink\">");
sb.Append(helper.ActionLink("aaaaa", "Gestion", "Anouar"));
sb.Append("</div>");
return sb.ToString();
}
}
}
I creat a new Controller named AnouarController :
namespace MvcApplication2.Controllers
{
[HandleError]
public class AnouarController : Controller
{
//
// GET: /Anouar/
public ActionResult Gestion()
{
return View();
}
}
}
and finally,,,this is what I add in the View of the link (which allow the action):
<%= Html.GestionLinkHelper() %>