I'm new to MVC, and would like to know in C# mvc5, what kind of code I would need to use, if I wanted to change the state of a textbox from enabled to disabled and vice versa based on which view is calling the partial view.
Try to add something like this in your tag: @('Condition Here') ? disabled:"disabled" : ""
Or:
object mode = ('Condition Here') ? null : new {disabled = "disabled" };
@Html.TextBoxFor(x => x.YourPropertyHere, mode)