我正在開發使用C#和SQL Server 2005jQuery的事件在ASP MVC 3 Web應用程序
我想創建一個按鈕一個jQuery事件一個ASP.Net MVC 3應用程序。這就像一個手風琴動畫。
我已經在模板中使用了一個示例,我想在另一個按鈕中重新制作它。
這是描述事件的video。
對不起,我沒有發佈任何代碼,因爲我沒有真正發現這個事件的腳本在哪裏。
但是,我會編輯我的帖子的任何需求。
感謝您的諒解:)
這是我想證明,當我點擊按鈕的觀點GESTION:
<%@ 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>
這是我創建了一個類GestionHelper下面的例子另一個按鈕:
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();
}
}
}
我創造了一個名爲AnouarController新的控制器:
namespace MvcApplication2.Controllers
{
[HandleError]
public class AnouarController : Controller
{
//
// GET: /Anouar/
public ActionResult Gestion()
{
return View();
}
}
}
終於,,,這是我在鏈接的視圖中添加(允許的動作):
<%= Html.GestionLinkHelper() %>
你必須發佈一些代碼。至少要創建一個視圖和按鈕。甚至更好,如果你刺探找到你放置腳本標籤的地方。你越給予更好的幫助,你會得到 – 2013-05-12 18:45:12
好吧只要繼續與我,我會張貼一些代碼,我嘗試做它 – anouar 2013-05-12 18:50:37
@DaveA檢查我編輯請 – anouar 2013-05-12 18:54:33