ASP.NET 2.0 Master pages + menu

M

Mark

I have a menu in a master page and two content pages. When I view the first
content page, and then click on a menuitem, the event handler runs the
following code

Page.Response.Redirect("~\\home.aspx", true);

The problem is that it now loads home.aspx and the menu is reset, so the
selected menu item no longer appears selected.

Is there a way around this problem?
 
C

clintonG

I had to learn this the hard way. There is a difference between a PostBack
and navigation. Navigation requires the developer to manage the state of his
or her controls. There is a new attribute called the PostBackUrl you should
also learn.

You should also find documentation to learn the correct context for the use
of the new Root Path Operator [~] as this issue can be confusing.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top