routevalues

    5熱度

    1回答

    我有必要使用ActionLink的鏈接到安編輯屏幕爲我的ViewModel A. A具有複合鍵,所以鏈接到它的路由值必須有3 pramaters,像這樣: <%: Html.ActionLink("EDIT", "Action", "Controller", new { area = "Admin", Id1= 1, Id2= 2, Id3= 3 })%> 正如你可以看到,路由值包含

    2熱度

    1回答

    我有一個基於ASP.NET MVC4的Web應用程序,我在其中使用包含三種語言標誌(圖像)的佈局。這些標誌在整個網站中都可見。現在我想用這些圖像進行語言選擇。爲了以特定語言顯示任何頁面,我只需要向當前URL添加一個參數並加載它,然後我的控制器對它進行評估並在模型中設置正確的語言(或者在存在時設置默認的回退語言在請求中沒有指定語言)。 下面是一個例子(hxxp = HTTP): 沒有語言規定: hx

    0熱度

    1回答

    我需要添加一個動態routevalue在html.beginform,像這樣 Html.BeginForm("action", "controller", new { somethingID = "some js function or jquery that get the value from a textbox" })) 我知道MVC是已經經過paramenter我的方法

    4熱度

    2回答

    我使用的是RouteValueDictionary到RouteValues傳遞給ActionLink的: 如果我的代碼: <%:Html.ActionLink(SharedResources.Shared_Pagination_First, Model.ActionToExecute, Model.ControllerToExecute, Model.FirstRouteValues, null)

    0熱度

    1回答

    我工作的一個圖像瀏覽器,所以我控制器命名爲Viewer,當我通過它routeValues它在URL中傳遞這樣的: http://www.mywebsite.com/Viewer?category=1&image=2 這裏是用來在該網頁上的鏈接: @Url.Action("Index", new { category = p.Category, image = p.Image }) 但我確實喜歡

    2熱度

    2回答

    所以我有一個URL操作 <a href="@Url.Action("Create","Teacher", new { createAndAssign = true, teacherID = Model.AccountID })">Create new teacher & assign to account.</a> 那傳入兩個routeValues:createAndAssign和teache

    0熱度

    1回答

    Razor視圖: @using (Html.BeginForm("Move", "Details", new { dict= dictionary}, FormMethod.Post)) { //table with info and submit button //dictionary => is a dictionary of type <Sales_Order_Colle

    4熱度

    1回答

    下面是WebAPI。 [RoutePrefix("api/customer")] public class CustomerController : ApiController { [Route("{id:int:min(1)}/")] public HttpResponseMessage Get(int id) { //my stuff }

    0熱度

    1回答

    我使用谷歌地圖API中的示例來繪製圓,並希望將地圖中的人口值放置在圓圈內部,我們可以做到這一點在谷歌地圖API 例子:https://developers.google.com/maps/documentation/javascript/examples/circle-simple 平圈內如演示所示,希望把人口

    -1熱度

    1回答

    documentation指出它「代表不區分大小寫您在路由框架的各個位置使用的鍵/值對的集合,例如,當您爲路由定義默認值或生成URL時基於路線。「 從我所看到的,它使用正常的Dictionary<string,object>在內部存儲它的密鑰,所以它實際上區分大小寫。我找不到這個類不區分大小寫的任何方面,那麼這個文檔就錯了?