خرید بک لینک

Vote count: 0

I am using MVC Entity framework i have generated code i have fields Isactive this fields have values true or false . code looks like

controller:

 [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Edit([Bind(Include="ClientId,ClientName,PrimaryContactName,EmailId,PrimaryContact,IsActive,ModifiedBy,ParentCompany")] TP_IntealClients tP_IntealClients)
        {
            if (ModelState.IsValid)
            {
                db.Entry(tP_IntealClients).State = EntityState.Modified;
                db.SaveChanges();
                retu RedirectToAction("Index");
            }
            retu View(tP_IntealClients);
        }

View:

 <div class="col-md-10">
                <div class="checkbox">
                    @Html.EditorFor(model => model.IsActive)
                    @Html.ValidationMessageFor(model => model.IsActive, "", new { @class = "text-danger" })
                </div>
            </div>

after run the code Isactive drop down showing true or false i want hidden field that time send value default true only to database . how i can hidden and send value default ? i doing i am getting error

asked 35 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 24 تير 1395 ساعت: 21:58

صفحه بندی