Justin and Sam were allured by their charming young teacher from the very first lecture, but all their awkward attempts to seduce her failed, so they decided to enjoy her gorgeous body against her will.
So, let's replace tbl Course with Course, tbl Student with Student, tbl Students with Students and tbl Course with Course. For now just run the application and by default the Index action method will be invoked that will display the Index.shtml file. If we insert a new record: Click Create, you will be redirected to Index.cshtml and you will see Michael's record. Since this is auto-generated code, it will not be a good idea to make any changes here. If you look at the image below, you will see the class Student is a partial class. In the constructor of the Required Attribute class add a custom error message. Step 6To specify a gender, users need to input their gender. So, what we will do is to mark the Student Name property field read-only and we will also replace the gender Text Box field with a dropdownlist. So, now the Student Name field is read-only and Student Gender is now displayed in a dropdownlist control. In the preceding method, notice that the student object is receiving the posted form values.