Skip to content
Loading
  
  •                         class="form-group">  
  •                             for="firstName">First Name  
  •                             @Html.TextBoxFor(m=>m.editRegForm.FirstName, new {@class = "form-control", type="text", id= "firstName", autofocus = "autofocus", placeholder = "First Name"})  
  •                           
  •                         class="form-group">  
  •                             for="lastName">Last Name  
  •                             @Html.TextBoxFor(m=>m.editRegForm.LastName, new {@class = "form-control", type="text", id="lastName", autofocus = "autofocus", placeholder = "Last Name"})  
  •                           
  •                         class="form-group">  
  •                             for="position">Position  
  •                             @Html.TextBoxFor(m=>m.editRegForm.Position, new {@class = "form-control", type="text", id="position", autofocus = "autofocus", placeholder = "Position"})  
  •                           
  •                         class="form-group">  
  •                             for="company">Company  
  •                             @Html.TextBoxFor(m=>m.editRegForm.Company, new {@class = "form-control", type = "text", id = "company", autofocus = "autofocus", placeholder = "Company"})                          
  •                           
  •                         class="form-group">  
  •                             for="address">Address  
  •                             @Html.TextBoxFor(m=>m.editRegForm, new {@class = "form-control", type="text", id="address", autofocus= "autofocus", placeholder = "Address"})  
  •                           
  •   
  •                       
  •                 }  
  •               
  •           
  •       
  •   
  •   
  •  
    0
  • Vishvjit Shinde
    0
     Hi @Gcobani Mkontwana
      
    from ctry in objContext.Details select ctry
     
    objContext.Details is Context class.this is just an example.
     
    Tell me this. List of the country are coming from Database or you want to Hardcode?
     
    Read this Once you get An Idea:
    https://www.compilemode.com/2017/01/display-country-list-with-out-database-in-asp-net-mvc.html 
    0
  • Asma Khalid
    0
    Look into this: https://bit.ly/2W8FHVL
     
    Mark the answer as yes if helpful.
     
    Thanks & Regards,
    Asma Khalid
     
    For more visit: www.asmak9.com
    0
  • 0
    hardcore Vishvjit i have not created any table field name there.
    0
  • Avnish Kumar
    0
    Hi visit my git repo https://github.com/avikeid2007/GeoEssential
    It has example for ASP.net Core and Framework both with data for world Countries, states and Cities.
    0
  • 0
    Hi Team
     
    I got rid of the error now on my view im getting this exception;
     
    "SystemException.Invalid = "value cannot be null" 
    1. class="form-group">  
    2.                               class="col-md-2 control-label">Select Country  
    3.                               class="col-md-10">  
    4.                                   @Html.DropDownList("CountryList", new SelectList(ViewBag.CountryList), new {@class = "form-control"})  
    5.                               
      
  •  
    0