.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Strange web.sitemap asp:menu behavior

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

I have a menu that is populated from a web.sitemap.  It works most of the time but on some every once in a while the links will have "/(x(1))/" inserted into them.   The links still work but people are prompted to login for each page they go to.

If I compare my local copy of the web.sitemap with the live one they are identical.  Replacing the live sitemap with my local copy fixes the problem.  I can even copy the live one down to my local machine and then back up and it will fix the problem.  So something is being reset, I'm just not sure what it is.  Any thoughts on how to fix this?

This is the only search result that seems relevant but I'm still not sure how to go about fixing it.


View Complete Post

More Related Resource Links

Strange Authentication Behavior...

I have an installation of SSRS 2008 that is exhibiting some very odd behavior with regards to authentication and permissions. I have SSRS installed on a box called SERVER1 and I'm a local admin on the box and an Administrator on the SSRS instance. This box has an IP address of When I go to the Report Manager URL, I see everything I should (Home, Site Settings, etc.) I'm able to go in and set up security and create folders and everything. What's odd is that if I use the IP address instead of the server name in the Report Manager URL, I get to the home page but there is nothing displayed, only Home, My Subscriptions, and Help. There are no report folders visible and the options available to admins aren't visible. One thing that may shed some light on things: if I do a ping -a on the IP address, it resolves to the host name. If I ping the host name, I get back a reply from ::1: I have no idea why permissions would differ between a host name and an IP address if they're the same server?? Any insight would be appreciated!A. M. Robinson

WPF Window as Modal Dialog, strange behavior

Hopefully someone has a clue.... My application displays WPF Window as a modal dialog box. The dialog box has a few child user controls, one of which has combo box. When the user clicks this combo box to select... the whole dialog disappears except of the innards of the combo box. So the user only sees the list box of the combo box. Here are the details I got from the  client: The window itself is launched from non WPF application (Lotus Notes). This happens only on a few machines. The OS is Windows XP SP3. There is no issue with the parent handle, windows owner, etc... I've seen this behavior during the development phase, only when running under a debugger.    Thanks, Michael        

Validation.Error giving strange behavior

I'm seeing some weird behavior with the Validation.Error attached event. I have a textbox bound to an object that implements the IDataErrorInfo interface. The textbox subscribes to the Validation.Error event. What is weird is that when you put the text box into an invalid state, the Validation.Error event gets triggered twice. Under .NET 3.5, the first time ValidationErrorEventArgs.Action == Removed. The second time ValidationErrorEventArgs.Action == Added. Under .NET 4, it's reversed. The first time ValidationErrorEventArgs.Action == Added. The second time ValidationErrorEventArgs.Action == Removed. Why would it be called twice and why would it work differently under .NET 3.5 and .NET 4? I'm trying to implement a validation summary control similar to the one from ASP.NET. There is a solution here: http://codeblitz.wordpress.com/2009/05/12/wpf-validation-summary-control/ but it doesn't work under .NET 4 because in order for it work work, when you put a control into an invalid state, the last call to the Validation.Error event has to be with ValidationErrorEventArgs.Action == Added. Here is my code:   <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplicatio

ListBox.SelectedItem stuck at whatever is first selected and other strange ListBox behavior

Hi, I've built a List<Participant> (Participant being my custom type) and assigned this to ListBox.ItemsSource. (I'm aware this is more the Windows Forms way than the WPF way of databinding, but I'd still like to understand what's going on here - even though suggestions on how to perform my task in a more WPF-y way are also welcome.) I've set ListBox.SelectionMode to Single, and attached an event handler to the SelectionChanged event. In this handler, I dump the SelectedIndex and SelectedItem to debug output. Contrary to my expectation, 1) SelectedIndex is always -1. This isn't really causing me any trouble, but it's certainly not what I'd expect. 2) SelectedItem refers to the correct object the first time (in the windows lifetime) I select an item, but then keeps referring to this first-selected item regardless of whether I deselect (by clicking the item again while holding down the CTRL key) or select some other item. 3) If I keep clicking around and scrolling a bit (the list has ~320 items) within the list, now and then the list suddenly displays a bunch of items - sometimes many in a row, sometimes non-contiguous items, but it seems always "nearby" items! - as if they were selected. The list keeps firing the SelectionChanged event, but SelectedIndex is forever -1 and SelectedItem (and SelectedValue) always refers to whatever I had selected the fir

strange mdx behavior in strtomember


i have a following piece of mdx

scope (dimension.member)



("Measures." + "[" + [Measures].CurrentMember.Name + "- X" + "]");

WPF - strange context menu behaviour



I create contextmenu using that code


 protected MenuItem itemAdd, itemDelete, itemSelectBranch, itemDeleteClasp;
  protected MenuItem itemCut, itemCopy, itemPaste, itemAddParent, itemPasteWithChildren;
  protected MenuItem itemAddTask, itemAddExtTask, itemAddMileStone;
 menu = new ContextMenu();
    itemAdd = new MenuItem
             HorizontalAlignment = HorizontalAlignment.Left,
             HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch,
             Header = "Add"
    itemDelete = new MenuItem
               HorizontalAlignment = HorizontalAlignment.Left,
               HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch,
               Header = "Delete"
    itemSelectBranch = new MenuItem
      HorizontalAlignment = HorizontalAlignment.Left,
      HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch,
                  Header = 

Strange ScrollViewer Behavior



When i use the following code, my scrollviewer appears for both vertical and horizontal. however the up and down arrows, and the left right arrows appear back to back. these buttons work fine. they just look terrible. after all the down button should appear at the bottom of my grid.

Can anyone help me out.



Gary Rusher

<local:BooleanToColorConverter x:Key="BooleanToColorConverter"/>

    <DataTemplate x:Key="BasicComponent">
      <TextBlock Text="{Binding Path=Description}"
            Foreground="{Binding Path=Rendered,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged,Converter={StaticResource BooleanToColorConverter}}">
    <HierarchicalDataTemplate x:Key="ComplexComponent"
                 ItemsSource="{Binding Components}">

strange mdx behavior in strtomember


i have a following piece of mdx

scope (dimension.member)



("Measures." + "[" + [Measures].CurrentMember.Name + "- X" + "]");

Menu - Role security not working on second level of sitemap


I have role assignments on both the first and second level of my menus within my sitemap file.  The first level works fine, and I only see items assigned to my role.

But roles assignments seem to have no effect on the second level.  It seems like if you have access to the first level, you have access to everything on the second level.

Is this correct?

From my sitemap (either a SalesRep or an Administrator can see everything underneath):

    <siteMapNode title="Administration" roles="SalesRep,Administrator" description="Admin" >

      <siteMapNode title="CompanyMaintenance" roles="SalesRep" url="~/Admin/CompanyManagement.aspx" />

      <siteMapNode title="Initialize Roles" roles="Administrator" url="~/Admin/Roles.aspx"/>


From my config:

    <roleManager enabled="true" defaultProvider="SqlRoleProvider">

Strange behavior for a workflow



I have a lot of strage behavior regarding my workflow host and it's workflows. I'll jump right into it. I use both the persistance and tracking service that comes out of the box. The WF host is hosted as a windows service and I have a WCF interface to "talk" to the host. WCF exposes methods like: "Start this workflow", "Change the status of this workflow" and "Terminate this workflow".

The strange behavior I talk about is this. When I call "Terminate workflow" I look in the tracking table WorkflowInstanceEvent I see this for the particular workflow:

WorkflowInstanceEventId WorkflowInstanceInternalId TrackingWorkflowEventId EventDateTime EventOrder EventArgTypeId EventArg DbEventDateTime
124715 15769 0 2010-09-27 17:20:42.210 1 NULL NULL 2010-09-27 17:20:45.930
124717 15769 12 2010-09-27 17:20:42.213 2 NULL NULL 2010-09-27 17:20:45.937
124719 15769 2 2010-09-27 17:20:42.237 5 NULL NULL 2010-09-27 17:20:45.957
124720 15769 6 2010-09-27 17:20:42.240 6 NULL NULL 2010-09-27 17:20:45.960
124721 15769 5 2010-09-27 17:20:42.247 7 NULL NULL 2010-09-27 17:20:45

strange behavior on form submit



i have a strange issue happening while submiting a form:

i have this in my form:

<input type="radio" name="type" onclick="document.getElementById('Type').value='Publiser';" />Publisher <br />
<input type="radio" name="type" onclick="document.getElementById('Type').value='Advertiser';" />Advertiser
<%: Html.TextBoxFor(m => m.Type)%>

the javascript is working perfectly and changes the value of the textbox.

the problem happens when i submit the form - what is extracteed by the model from the textbox is the string "on", and after the submit, it also changes the value of the textbox to "on".

when i load the field with a value from the model, it goes ok, and does not change

any ideas?

Strange Rounding Behavior


Ugh.  I have been fighting rounding problems in my SSIS package since yesterday morning.  I have traced the rounding problem back to what appears to be an undesired rounding of a decimal to the tenths place when retrieving data via OLE DB Source and I can't figure out how to fix that.

I have a Source database which is Sybase.  There is a table (let's call it "foo").  In the "foo" table there is a column (let's call it "amount").  For a given row in the "foo" table, the "amount" column equals exactly 1.875.

When my OLE DB source retrieves the data it retrieves the value of "amount" for that row as 1.9 instead of 1.875.

If I use an MS Access app to connect to that same Sybase database via ODBC and retrieve that exact same row from the "foo" table the value of "amount" is correctly retreived as 1.875.

I have tried playing with the advanced settings of my OLE DB source and setting the source column type to double precision float instead of just float (DT_R8 vs DT_R4) to no success.  When I preview the data (or run the SSIS package) the value is retreived as 1.9 instead of 1.875.

Any help on why this is happening would be appreciated.  It is causing me a real headache (and inaccurate data results as well)

- Charles

Adjusting fontcolor on a sitemap menu


I've been working for hours on something that should be simple but baffles me.  Perhaps, someone could give me a suggestion.

I'm trying to change the font color of a sitemap to white.  The color is white in the developer screen but black in the browser when I run it.  In fact, it should change to white when I hover over it but it does not.

Here is my code perhaps someone could see what I'm doing wrong.


<td class="style3" bgcolor="#E3D8B6" width="200px" style="float: right; color: #FFFFFF;">

     <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" StaticDisplayLevels="2" ForeColor="White" ItemWrap="True" BorderStyle="Solid" StaticSubMenuIndent="0px" BorderWidth="1px">

          <StaticSelectedStyle Font-Italic="True" BackColor="#1C5E55" />

          <DynamicSelectedStyle BackColor="#343055" ForeColor="White" />

          <StaticHoverStyle BackColor="#332F54" ForeColor="White" />


menu and sitemap have errors.


Hi there I am a student in an ASP.NET class 2.0.

Anyways, I am getting squigly lines in my code and asp.net is telling me that the sitemap and my menu are not supported.
I am trying to make my code as clean as possible, the code works but is just not clean enough. Please tell me why there are squigly lines and what I can
Do to make the page more asp.net friendly.

Thanks Much!

JonnyBelow is my code I am useing in a master.master page.  Thanks in advance.


<form id="form1"

Sitemap and menu


Hi everyone!

I have question about using sitemap and i would appreciate everyone reply me. I am creating navigation menu using sitemap. i need to create the menu inline as 1)Home 2)Services  3)Contacts 4)FeedBack. but all elements are included into parent node so i have menu with one parent element displayed

Q1. How can i hide the parent elemet of  <sitemapnode> as it contains of all menu element that cause menu to be displayed one parent element with child elements.  Is it ok to use showstartnode="false" for SiteMapDataSource? if it is what should i specify for url elements of parent sitemapnode (it should be empty one as i guess)?

Q2. What do you think about using sitemap for navigation menu at all? Can it affect to site perfomance ? Maybe it is better to use css menu?

Q3. And what about dynamic menu based on <aspx:menu> and sitemap if user's browser has javascript action disabled? i guess dynamic menu will be failed in this case, won't be?

Strange behavior with $().load in Javascript in MVC view


 OK i have a javascript which calls the two Java commands:




These are called after a submit button is pressed (there are additional script commands before these).  Both DuplicateFilesList and UploadedFilesList are the ID of a <div> on the page.  the problem I am having is that the #uploadedFilesList <div> is updated appropriately every single time.  Works like a charm.  the #DuplicateFilesL

Strange behavior of UserControl_SizeChanged event

Hello All,

I'm working with Silverlight 4 and followed directions in this post http://forums.silverlight.net/forums/t/69118.aspx to overlay an inner grid on top of a canvas, both of them in a outgrid.

Next I programmatically added columns to the inner grid and stackpanels to fit the column sizes. Next I added buttons to the various stackpanels. 

My next task was to add lines between the buttons in a parent child relationship(basically a tree). I have enclosed the drawing procedure in a private function and call that function from UserControl_SizeChanged event.

These are my experiences and I'm perplexed at the reason for the following behaviour.

1. UserControl_SizeChanged event is fired twice when application loads

2. When the application first loads  the tree formation is perfect starting from the root node on the left of the screen. Issue comes up when I resize the browser windows. The arrow lines between buttons does not disappear and more lines appear in the tree. Strangely this happens only between the root node and nodes in the first level. As play around resizing the browser arrow lines multiply many fold only between the root node and nodes at the first level(root node's childred).
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend