I am using windows authentication. I have login name availble in a string, got that from current logged in user.
I am using MVC3 with Razor. I need to autopopulate the textbox with the current logged in username and should be readonly. How can I bind these in MVC 3 ASp.NET. Any directions, Please?
Thank you
You can pass login name to view in viewbag:
In your controller code:
And use it in your view like this: