Problem with retrieving Data for member in XSLT after saving it in C# control Options
corleon
Posted: Friday, August 15, 2008 11:19:36 AM
Rank: Newbie

Joined: 6/24/2008
Posts: 1
Location: Minsk
Hi guys,

I faced some strange problem and I want to know opinion of more experienced guys.

The thing is that I wanted to add to site AddBookmark feature. User press AddBookmark button, which sends a simple xmlhttp request like - addbookmark.aspx?nodeId={currentNodeId}.
On the AddBookmark.aspx page OnPageLoad I am saving nodeId for member into "bookmarks" property
Code:
Member curMember = Member.GetMemberFromLoginName(memberLogin);

            string newId = Request.Form["nodeId"];

            if (newId != null)
            {
                Property prop = curMember.getProperty("bookmarks");
                if (string.IsNullOrEmpty(prop.Value.ToString()))
                {
                    prop.Value = newId;
                }
                else
                {

                    string[] ids = ((string)prop.Value).Split(new char[] { ',' });
                    foreach (string id in ids)
                    {
                        if (id == newId)
                        {
                            return;
                        }
                    }
                    prop.Value += string.Format(",{0}", newId);
                }
                curMember.Save();
            }


Then when I go to the umbraco members area I can see all changes for current member took place correctly. Now for the problem - somehow I cant reflect all that nodes for current members on the page. I use next xslt to reflect it :
Code:
<xsl:template match="/">

<!-- start writing XSLT -->

<div class="hdrLeft">MyDeals</div>
<ul class="MenuBarVertical">
<xsl:for-each select="umbraco.library:GetCurrentMember()/data [@alias = 'bookmarks']/nodes/node">
<li>
<a href="{umbraco.library:NiceUrl(.)}">
<xsl:value-of select="umbraco.library:GetXmlNodeById(.)/@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>


</xsl:template>


the thing is that I press the the addbookmark button, I see new nodeId added in members area , BUT I cant see any changes on my page till I hit Save button in Members area. How can I solve that problem? Thanx a million.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.