Explore the Top Microsoft SQLServer Technical/ Interview Questions here: http://XploreSqlServer.blogspot.com/
Explore the Top Microsoft C# Technical/ Interview Questions here: http://XploreCSharpDotNet.blogspot.com
Explore the Top Microsoft Blazor Technical/ Interview Questions here: https://XploreBlazor.blogspot.com/
Explore the Top Microsoft Blazor Technical/ Interview Questions here: https://XploreBlazor.blogspot.com/
@Html.TextBox("txtCity", "Chennai", new { @readonly = "readonly" })
The nugget generates the following HTML:
<input id="txtCity" name="txtCity" readonly="readonly" type="text" value="Chennai" />
The following nugget is to create a read only textbox bound to the model property, City :
@Html.TextBoxFor(model => model.City, new { @readonly = "readonly" })
Explore the Top Microsoft SQLServer Technical/ Interview Questions here: http://XploreSqlServer.blogspot.com/
Explore the Top Microsoft C# Technical/ Interview Questions here: http://XploreCSharpDotNet.blogspot.com