मैं एमवीसी रेजर के लिए नया हूं।एमवीसी रेजर बटन इसके साथ पैरामीटर पास भी क्लिक करें
@model SuburbanCustPortal.Models.CustomerModel
@{
ViewBag.Title = "Customer Summary";
}
<h2>Customer Summary Screen</h2>
<p>
Please select an account below or add an existing account.
</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
<div>
<fieldset>
<legend>Existing Accounts</legend>
@Html.Action("ExistingAccounts2")
<p>
<input type="submit" value="Add an Account" />
</p>
</fieldset>
</div>
}
कौन इस विधि कॉल:
मैं इस दृश्य है
[Authorize]
public ActionResult ExistingAccounts2()
{
return PartialView("ExistingAccounts", _client.RequestCustomersForAccount(User.Identity.Name));
}
कौन सा बदले में यह आंशिक दृश्य कॉल:
@model IEnumerable<SuburbanCustPortal.SuburbanService.CustomerData >
<br />
<br />
<table>
@if (Model != null)
{
foreach (var usr in Model)
{
<tr>
<td>
<input id="btnShowCustomer" name="btnShowCustomer2" type="submit" value="View"/>
</td>
<td>
@usr.AccountId
</td>
<td>
@usr.Name
</td>
@* <td>
@usr.DeliveryStreet
</td>*@
</tr>
}
}
</table>
<br />
कौन इसे प्रदर्शित समाप्त होता है:
यह इस बिंदु तक काम करता है।
मैं जो करना चाहता हूं वह ग्राहक के नाम के बगल में स्थित बटन पर क्लिक करने में सक्षम है और यह ग्राहक के खाते को खींचता है।
मैं उस ग्राहक को बटन से कैसे बांधूं यह जानने के लिए कि कौन खींचना है और बटन को कैसे खींचें इसे कैसे क्लिक करें?
को त्रुटि मिली है - "डेटा-ग्राहक तत्व इनपुट के लिए मान्य विशेषता नहीं है" –
फिर मैं अपने नियंत्रक में यह जानकारी कैसे प्राप्त करूं? – Danieboy