tag:blogger.com,1999:blog-6082652835152798567.post1481717176347597608..comments2024-03-28T21:41:58.974-07:00Comments on Sql server, .net and c# video tutorial: Part 27 - Customizing the autogenerated create viewUnknownnoreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6082652835152798567.post-66954811016745462922019-11-28T03:47:42.721-08:002019-11-28T03:47:42.721-08:00Hi, when i tried to create the Employee.cs and Dep...Hi, when i tried to create the Employee.cs and Department.cs it is showing error "The file is already exists "Anonymoushttps://www.blogger.com/profile/11671093392517461636noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-42281766109090499542018-07-16T10:46:06.263-07:002018-07-16T10:46:06.263-07:00You need to add the Required attribute to the Empl...You need to add the Required attribute to the EmployeeMetadata and not to the partial classAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-44859445956005508872016-04-27T00:57:16.784-07:002016-04-27T00:57:16.784-07:00Hi, i have created simple project and added a new ...Hi, i have created simple project and added a new table with name student with entity frame work, and all CRUD funtionalities are working with entity frame but when i tried to apply partial class validation, then is post the data to the controller not validating the partial class. can you tell me what could be the problem ?<br />Anonymoushttps://www.blogger.com/profile/01299079418275522864noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-10332758734309665772016-01-30T11:19:46.116-08:002016-01-30T11:19:46.116-08:00[required] function is not working in partial clas...[required] function is not working in partial class...why???valar morgulishttps://www.blogger.com/profile/14783448237639532603noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-24407420948559991802015-01-01T10:39:56.234-08:002015-01-01T10:39:56.234-08:00I think you are having issue with the Key/Column/P... I think you are having issue with the Key/Column/Property name mismatch anywhere in the code. Make Sure you are having the same name for all the fields/properties as DepartmentId for that mentioned field including the auto-generated classes too...<br /><br /> @Html.DropDownList("DepartmentId", "Select Department")<br /> @Html.ValidationMessageFor(model => model.DepartmentId)Anonymoushttps://www.blogger.com/profile/12920311998884208286noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-78506373698419725882014-12-19T21:20:38.964-08:002014-12-19T21:20:38.964-08:00Hi Venkat,
I have a doubt regarding data binding t...Hi Venkat,<br />I have a doubt regarding data binding to the Department dropdown list in Create view.<br />we used the following statement for department<br />@Html.DropDownList("DepartmentId", "Select Department")<br />but we didn't provide any data in the form of a list like the gender dropdown.<br />Can you please how this binding is happening automatically.<br />sreekanthhttps://www.blogger.com/profile/12104861868083231563noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-53266544723413922722014-03-13T19:59:28.952-07:002014-03-13T19:59:28.952-07:00hello i have been following this tutorials and I c...hello i have been following this tutorials and I created the Entity Model and automatically generated the views as well.<br /><br />In the Create view, the department names are not shown as a dropdown menu but as an @HTML.EditFor(). I tried doing @Html.DropDownList("DepartmentId", "Select Department") in the view but i keep getting an error saying there is no ViewData item of type IEnumerable that has the key 'DepartmentId'<br /><br />I tried using ViewBag.Departments = new SelectList(db.Departments, "Id", "Name"); which works in creating the dropdown list but when i submit the form, the departmentId is null and it inputs null into the db. All other fields of the Create view works normally apart from this. Please help. Thank you Anonymousnoreply@blogger.com