Monday, April 1, 2019

Pass Another Value from ViewBag or Other ino EditorFor

...
@if (d.fee1 > 0)

{

<div class="form-group">

@Html.LabelFor(model => model.fee1, htmlAttributes: new { @class = "control-label col-md-2" })

<div class="col-md-10">

    @Html.EditorFor(model => model.fee1, new { htmlAttributes = new { @class = "form-control",@Value=d.fee1 } })

    @Html.ValidationMessageFor(model => model.fee1, "", new { @class = "text-danger" })

</div>

</div>

}

@if (d.fee2 > 0)

{

<div class="form-group">

@Html.LabelFor(model => model.Fee2, htmlAttributes: new { @class = "control-label col-md-2" })

<div class="col-md-10">

    @Html.EditorFor(model => model.Fee2, new { htmlAttributes = new { @class = "form-control" ,@Value=d.fee2} })

    @Html.ValidationMessageFor(model => model.Fee2, "", new { @class = "text-danger" })

</div>

</div>

}

No comments:

Post a Comment

When web application with sql server connection using sql client, working in visual studio but not working in localhost as in iis

Error:  The EXECUTE permission was denied on the object 'StoredProcedureTest1', database 'testDb1', schema 'dbo'.  C...