forum

Home / DeveloperSection / Forums / How to show/hide panel in mvc?

How to show/hide panel in mvc?

Anonymous User217211-Oct-2014

I am using strongly typed views in my MVC and have now managed to show all the editors for my register form as I like.

The problem is that I have a radio group containing 4 radio button, When selecting a radio button I neet to hide some of the editors that are bound to the strong typed property fields.

I could create a javascript function like this.

if(radiobonnton1.value = cehcked){
           //Hide not used fields
           //Show used fields
        }
        elseif(radiobonnton2.value = cehcked){
         ...
        }
        ...

The problem with this is that it will be a BIG function and Im not sure how the MVC Validation will handle it if a editor that is not valid are hidden? Will it still be possible to submit?


Updated on 11-Oct-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By