You can create a separate method to bind country dropdown-
public static SelectList GetCountries(int selected = 0)
{
return new SelectList(Repository.Instance.All<country>(), "Id", "Name", selected);
}</country>
@Html.DropDownListFor(x=>x.CountryId,GetCountries(x.CountryId),"[Select]")
The method return type is
SelectList
so you just need to pass the
Id
of India in
GetCountries
method as parameter.
another way you can add all the items into list except India and then insert India at position 0 or add India as first row in your database table, or create a column
int_Order
in your database table and user
OrderBy
clause.