部分视图回发未发布值

编程入门 行业动态 更新时间:2024-10-26 02:30:29
本文介绍了部分视图回发未发布值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好 i得到了以下部分视图

Hello i have got the bellow partial view

@model AccountPortal.Models.AddressModel @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> <h4>AddressModel</h4> <hr /> <p> @Html.Label("House Number or Name") @Html.EditorFor(model => model.AddressLine1) </p> <p> @Html.LabelFor(model => model.Postcode) @Html.EditorFor(model => model.Postcode) </p> </div> } <div> @Html.ActionLink("Continue", "GetAddress", new { home = Model.AddressLine1, postcode =Model.Postcode }) @Html.ActionLink("Don't Know the Postcode", "AddressManuallyEnter")| @Html.ActionLink("BFPO Customer", "ManuallyAddForBFPO") </div>

填写门牌号后,邮政编码点击了继续actionLink,我也是GetAddress方法但是 主页,邮政编码为空。 我错过了什么 贝娄是我的GetAddress行动方法

and after filling the House Number, and the postcode clicked on the Continue actionLink which too me to GetAddress method but the home, postcode are null. what i have been missing out bellow is my GetAddress Action method

public ActionResult GetAddress(string home, string postcode) { var A = SelectedAddress; List< AddressModel> model = AddressUtility.FindAddressByPostcode(home, postcode, false); AddressUtility.BuildAddressSelectList(ref model); return PartialView(model); }

感谢您的所有帮助

Appreciate all your help

推荐答案

使用此行public ActionResult GetAddress([FromUri ] string home,[FromUri] string postcode) use this line public ActionResult GetAddress([FromUri]string home,[FromUri] string postcode)

使用JAVASCRITP提交来自 USING JAVASCRITP TO submit the from

更多推荐

部分视图回发未发布值

本文发布于:2023-10-12 23:14:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1486157.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   回发未

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!