There is still something new for ASP.net, and I have this strange problem. This is a very simple scenario, but something is wrong, and I cannot figure it out. The deployment should return a view named Deploy, which is entered into the CompiledAppModel model. However, when you click on the installation in the view, it never leaves the page, despite the call to the return () method. Any ideas?
Here is my controller:
[HttpPost] public ActionResult Deploy(string key_name, string custom_folder = "") { string userId = Membership.GetUser().ProviderUserKey.ToString(); UserDataModel user_info = _user_data_service.getUserDataByPrimaryIDNoDB(userId, HttpContext.Cache); log.Trace("Deploy was called. key_name:" + key_name + " UID: " + user_info.UID);
and my opinion:
@model IEnumerable<Models.Applications.FmsAppModel> @foreach (var item in Model) { <div class="col"> <h2>@Html.DisplayFor(modelItem => item.friendly_name)</h2> <p>@Html.DisplayFor(modelItem => item.app_description)</p> <p><strong>Tags:</strong> @Html.DisplayFor(modelItem => item.app_type)</p> <a href="#" class="btn btn-primary install-app" data-key-name="@(item.key_name)">Install</a> @Html.ActionLink("Details", "Detailss", new { id=item.app_id }) </div> } </div> <script type="text/javascript"> (function () { $('.install-app').on('click', function (e) { e.preventDefault(); var data_key_name = $(this).data('key-name'); </script>
And the model.
public class CompiledAppModel { [Display(Name = "Admin URL")] public string adminURL { get; set; } [Display(Name = "Viewer URL")] public string viewerURL { get; set; } [Display(Name = "Embed URL")] public string embedURL { get; set; } }
user1608132
source share