How can I redirect to a view of a page from a different page.

Prysson
Prysson used Ask the Experts™
on
Is it possible...and if so how...

to redirect from one aspx page directly to a view in a different page.

FOr example.

Page A has three views
I am on page B and for a button Onclick event I want to response.redirect not jut back to page A but to view 2 on page A.


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
If you set a session variable before you redirect saying what View to load and check that in the Page_Load section if(!Page.IsPostBack) then that should work.

Commented:
What do you mean by a VIEW?

You could add an argument to the .aspx page (e.g. pageA.aspx?showPart=2) and use the querystring to determine the VIEW you need to activate.

Author

Commented:
strickdd...do you know how to load the view in the Page Load method.

Currently I just use the command argument property of buttons to move from view to view...

Commented:
if you are using a multiview containing views, then you should just do: MultiViewObject.SetActiveView = viewObj

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial