I want to hide drop down according to class property value in asp.net mvc 3 razar view
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could apply a CSS class to the dropdown:
and then define the hidden CSS class:
This hidden class could of course be applied dynamically based on some property value of the view model. For example you could write a custom HTML helper which could be used like so:
where the
GetHtmlAttributesis a custom extension method that you could write: