Can I use jquery/javascript with multiview?
-
06-07-2021 - |
Question
I have a multiview control with a number of sections.
For each section, I have a button that sits outside the MV, which when clicked opens one of the views (tab style).
I was wondering whether I can override with jquery/javascript if available, so that no postback occurs. However because the multiview doesn't render all views, I'm unsure if and how this can be achieved.
Anyone have any ideas?
Solution
As you said, because MultiView
only renders the active view, there is no way you can switch view without a postback. You could switch away from MultiView
and use Ajax to load content instead, but then instead of a postback you would have Ajax calls.
Probably your easiest solution is to wrap the Button
and the MultiView
inside an UpdatePanel
, which will take care of all of this for you.