Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
disabling controls is not working in my view
saranya
Nov 28 2017 12:57 AM
155
In my view:
<script type="text/javascript">
$(document).ready(function() {
var disabled = <%=ViewData["disablecontrols"].ToString()%>;
if (disabled) {
$('input,select').attr('disabled',disabled);
}
})
</script>
<input type="text" name="patientName">
On clicking New button it directs to newdetail controller
In my controller :
public ActionResult NewOperation(string button)
{
PatientDemoVM patientpersonal = new PatientDemoVM();
if (button == "New")
{
ViewData["disablecontrols"] = false;
patientpersonal.PatientCode = null;
return View("PatDemo", patientpersonal);
}
return View();
}
Reply
Upload Source Code
Select only zip and rar file.
Post
Reset
Answers (
3
)
Jquery Date Picker not working MVC
how to design database with relationship