Changing ASP.NET DetailsView default mode from view to, say, Edit
Posted: (EET/GMT+2)
If you are using the .NET 2.0 DetailsView component in your ASP.NET web applications for example with C#, then you might wish to change the default view of the component from the record view to the Edit or Insert views. How do you do this?
Luckily, it is very simple: the control has a property called DefaultMode, which you can change to your liking. But you have to know that such a property exists. The available options are DetailsViewMode.ReadOnly, DetailsViewMode.Edit and DetailsViewMode.Insert. Pretty self-explanatory.