Click here to Skip to main content
15,899,634 members
Home / Discussions / C#
   

C#

 
Questiongrid control, tile view Pin
Member 1201862628-Sep-15 20:00
Member 1201862628-Sep-15 20:00 
AnswerRe: grid control, tile view Pin
OriginalGriff28-Sep-15 20:11
mveOriginalGriff28-Sep-15 20:11 
QuestionWhy can I save the error information into the table of SQL server ? Pin
Member 245846728-Sep-15 17:40
Member 245846728-Sep-15 17:40 
AnswerRe: Why can I save the error information into the table of SQL server ? Pin
Wendelius28-Sep-15 17:57
mentorWendelius28-Sep-15 17:57 
GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Member 245846729-Sep-15 17:36
Member 245846729-Sep-15 17:36 
GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Wendelius29-Sep-15 18:15
mentorWendelius29-Sep-15 18:15 
GeneralRe: Why can I save the error information into the table of SQL server ? Pin
Member 24584672-Oct-15 2:56
Member 24584672-Oct-15 2:56 
QuestionSitemapnode(breadcrumb) value changes with multiple users Pin
nitin_ion28-Sep-15 4:09
nitin_ion28-Sep-15 4:09 
Hi,

I have a user website, having pages Home-->Brands --> Properties --> Designs --> Objects. Each page having its own sets of selection value.

Using breadcrumb navigation (sitemap path) in master page, and all the pages of website uses this masterapge.

Problem: When there are multiple user logged in diffrent machines, the breadcrumb node value (for a user) changes according to the latest selected value, inside any page (by latest slection of any other user).

Example: User A clicked Home-->Brands(Accenture)-->Properties(Accentire Prop).... and in the same time if another User B clciked Home-->Brands(Samsung)-->Properties(Samsung Prop)....

Then navigation trail for user A changes(when he selects the Designs(Accenture Des)) to the latest selection by any other user (user B), i.e. Home-->Brands(Samsung)-->Properties(Samsung Prop) --> Designs (Accenture Des).


Please help why it happens.


CODE:-

IN WEB.SITEMAP:
XML
<siteMapNode  title=""  description="">
    <siteMapNode url="~/Secure/Home.aspx" title="HOME"  description="" roles="*" >
      <siteMapNode url="~/Secure/Properties.aspx" title="Properties"  description=""  roles="*" >
        <siteMapNode url="~/Secure/Designs.aspx" title="Style Guides Designs"  description=""  roles="*" >
          <siteMapNode url="~/Secure/Objects.aspx" title="Objects"  description=""  roles="*" />
        </siteMapNode>
      </siteMapNode>
    </siteMapNode>



In WEB.CONFIG

C#
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
      <providers>
        <clear/>
        <add name="XmlSiteMapProvider"
        description="Default SiteMap provider."
        type="System.Web.XmlSiteMapProvider"
        siteMapFile="Web.sitemap" />
      </providers>
    </siteMap>



In Master page.master

ASP.NET
<div id="SiteMapContainer" class="siteMapContainer" runat="server">
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server" PathSeparator=" \ " PathDirection="RootToCurrent"
                        ParentLevelsDisplayed="10">
                        <CurrentNodeTemplate>
                            <%# Eval ("title") %>
                        </CurrentNodeTemplate>
                        <RootNodeTemplate>
                            <a href="Home.aspx">
                                <%# Eval ("title") %>
                            </a>
                        </RootNodeTemplate>
                    </asp:SiteMapPath>
                </div> 


In webpages(brands, Properties etc..):


C#
if (SiteMap.CurrentNode != null)
            {


                SiteMapNode currentNode = SiteMap.CurrentNode;
                
                currentNode.ParentNode.ReadOnly = true;
                currentNode.ReadOnly = false;
                currentNode.Title = _brand.BrandName ?? currentNode.Title.ToString();
                currentNode.Url = BuildQueryString(currentNode.Key);
                currentNode.ReadOnly = true;

                currentNode.ParentNode.ReadOnly = false;
                
                currentNode = currentNode.ParentNode;
                currentNode.ReadOnly = false;
                ItemSelectionLink.NavigateUrl = BuildQueryString(currentNode.Key);
                currentNode.ReadOnly = true;
            }

AnswerRe: Sitemapnode(breadcrumb) value changes with multiple users Pin
Pete O'Hanlon28-Sep-15 4:58
mvePete O'Hanlon28-Sep-15 4:58 
AnswerRe: Sitemapnode(breadcrumb) value changes with multiple users Pin
Richard Deeming28-Sep-15 6:30
mveRichard Deeming28-Sep-15 6:30 
QuestionPort some C++ code which contains WriteFile to C# Pin
Member 1206160028-Sep-15 1:48
Member 1206160028-Sep-15 1:48 
AnswerRe: WriteFile equivalent in C# Pin
Pete O'Hanlon28-Sep-15 3:00
mvePete O'Hanlon28-Sep-15 3:00 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 3:18
Member 1206160028-Sep-15 3:18 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 3:21
Member 1206160028-Sep-15 3:21 
GeneralRe: WriteFile equivalent in C# Pin
Dave Kreskowiak28-Sep-15 3:40
mveDave Kreskowiak28-Sep-15 3:40 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 3:55
Member 1206160028-Sep-15 3:55 
GeneralRe: WriteFile equivalent in C# Pin
Dave Kreskowiak28-Sep-15 4:09
mveDave Kreskowiak28-Sep-15 4:09 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 4:15
Member 1206160028-Sep-15 4:15 
GeneralRe: WriteFile equivalent in C# Pin
Dave Kreskowiak28-Sep-15 4:25
mveDave Kreskowiak28-Sep-15 4:25 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 4:32
Member 1206160028-Sep-15 4:32 
GeneralRe: WriteFile equivalent in C# Pin
Dave Kreskowiak28-Sep-15 7:07
mveDave Kreskowiak28-Sep-15 7:07 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 7:31
Member 1206160028-Sep-15 7:31 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 7:46
Member 1206160028-Sep-15 7:46 
GeneralRe: WriteFile equivalent in C# Pin
Dave Kreskowiak28-Sep-15 8:35
mveDave Kreskowiak28-Sep-15 8:35 
GeneralRe: WriteFile equivalent in C# Pin
Member 1206160028-Sep-15 9:06
Member 1206160028-Sep-15 9:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.