Monday, March 26, 2012

newbie: problem with menuitems

hey

asp.net 2.0

My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in the
main menu.)

This is my sitemap (or a part of it)
<siteMapNode url="~/Network.aspx" title="Network" description="" >
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="" title="Invite" description="" />
</siteMapNode>
<siteMapNode url="~/Member.aspx" title="Member" description="" >
<siteMapNode url="" title="ItemA" description="" />
<siteMapNode url="" title="ItemB" description="" />
<siteMapNode url="" title="ItemC" description="" />
<siteMapNode url="" title="ItemD" description="" />
<siteMapNode url="" title="ItemE" description="" />
<siteMapNode url="" title="ItemF" description="" />
<siteMapNode url="" title="ItemG" description="" />
</siteMapNode
My problem now is that the sub menu items of "Member" isn't displayed when
Member.aspx is the active page...

This scenario involves 3 web pages. "search.aspx", "result.aspx" and
"Member.aspx". It works like this: The user opens the search.aspx file to do
a search (He enter some values in a textbox and clicks on a button). The
result.aspx file is shown, displaying the result of the search... Now I can
click on one of the rows in the repeater control of "result.aspx" to bring
up Member.aspx (displaying detailed info about the member)

I use Server.Transfer to go from search.aspx -result.aspx -Member.aspx

The code in the search.aspx file calling the result.page:
Server.Transfer("~/Result.aspx?name=" + txtFullname.Text);
After the transfer to result.aspx my browser shows still the same URL as it
had on the search.aspx page (http://localhost:2773/Search.aspx)

The code in the result.aspx file calling Member.aspx:
protected void OnClick(Object o, ImageMapEventArgs e)
{
string id = e.PostBackValue; //will use this variable later, when the
menu works
Server.Transfer("~/Member.aspx");
}
After the transfer to Member.aspx my browser shows this URL
:http://localhost:2773/Result.aspx?name=l

It looks like the URL for member.aspx show the URL for result.aspx...

BTW I enter entered "Member.aspx" directly in my browser URL and then it
displayed to the correct sub menu items in the sidebar menu..

So I guess my problem is related to the URL problem mentioned above. Any
suggestions to solve my problem with submenu items/URL mentioned above are
greatly appreciated!

JeffCASE SOLVED

"Jeff" <it_consultant1@.hotmail.com.NOSPAMwrote in message
news:eZDncSZsGHA.4324@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

hey
>
asp.net 2.0
>
My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in the
main menu.)
>
>
This is my sitemap (or a part of it)
<siteMapNode url="~/Network.aspx" title="Network" description="" >
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="" title="Invite" description="" />
</siteMapNode>
<siteMapNode url="~/Member.aspx" title="Member" description="" >
<siteMapNode url="" title="ItemA" description="" />
<siteMapNode url="" title="ItemB" description="" />
<siteMapNode url="" title="ItemC" description="" />
<siteMapNode url="" title="ItemD" description="" />
<siteMapNode url="" title="ItemE" description="" />
<siteMapNode url="" title="ItemF" description="" />
<siteMapNode url="" title="ItemG" description="" />
</siteMapNode>
>
My problem now is that the sub menu items of "Member" isn't displayed when
Member.aspx is the active page...
>
This scenario involves 3 web pages. "search.aspx", "result.aspx" and
"Member.aspx". It works like this: The user opens the search.aspx file to
do a search (He enter some values in a textbox and clicks on a button).
The result.aspx file is shown, displaying the result of the search... Now
I can click on one of the rows in the repeater control of "result.aspx" to
bring up Member.aspx (displaying detailed info about the member)
>
I use Server.Transfer to go from search.aspx -result.aspx -Member.aspx
>
The code in the search.aspx file calling the result.page:
Server.Transfer("~/Result.aspx?name=" + txtFullname.Text);
After the transfer to result.aspx my browser shows still the same URL as
it had on the search.aspx page (http://localhost:2773/Search.aspx)
>
The code in the result.aspx file calling Member.aspx:
protected void OnClick(Object o, ImageMapEventArgs e)
{
string id = e.PostBackValue; //will use this variable later, when the
menu works
Server.Transfer("~/Member.aspx");
}
After the transfer to Member.aspx my browser shows this URL
:http://localhost:2773/Result.aspx?name=l
>
It looks like the URL for member.aspx show the URL for result.aspx...
>
BTW I enter entered "Member.aspx" directly in my browser URL and then it
displayed to the correct sub menu items in the sidebar menu..
>
So I guess my problem is related to the URL problem mentioned above. Any
suggestions to solve my problem with submenu items/URL mentioned above are
greatly appreciated!
>
Jeff
>

0 comments:

Post a Comment