Click here to Skip to main content
15,927,514 members
Home / Discussions / Web Development
   

Web Development

 
QuestionCSS 101 Pin
martin_hughes5-Nov-07 10:10
martin_hughes5-Nov-07 10:10 
AnswerRe: CSS 101 Pin
Pete O'Hanlon5-Nov-07 10:20
mvePete O'Hanlon5-Nov-07 10:20 
GeneralRe: CSS 101 Pin
martin_hughes5-Nov-07 10:28
martin_hughes5-Nov-07 10:28 
GeneralRe: CSS 101 Pin
Pete O'Hanlon5-Nov-07 10:45
mvePete O'Hanlon5-Nov-07 10:45 
GeneralRe: CSS 101 Pin
martin_hughes5-Nov-07 11:46
martin_hughes5-Nov-07 11:46 
QuestionXML Web Service Error Pin
-BoBo5-Nov-07 9:54
-BoBo5-Nov-07 9:54 
QuestionASP Error:(0x8004020F).The event class for this subscription is in an invalid partition Pin
Ramya.G5-Nov-07 7:28
Ramya.G5-Nov-07 7:28 
QuestionBinding XML to Menu Control Pin
RobStan5-Nov-07 7:27
RobStan5-Nov-07 7:27 
I'm having some issues with binding an xml document to a menu control. I have an xml file and it has every possible link in it. I'm trying to create some security to the menu by filtering out the nodes that the user does not have access to. If the user does not have access to the link I remove it from the xml file. Onces its finished going through the xml file I bind it to the menu. It works for the first person that logs into the site. But if somone else logs in and they have different access they are getting the same menu as the first person that logged in. So it seems that who ever logs into the site first it gives that menu to everyone. I run it locally as one user and then login as another user I get the same menu. The only time it changes is when I rebuild the project. I verified its running everytime by saving the new xml file with the users name in it. The user is seeing links that's not in there xml file. It always uses the xml file of the user that first logged into the site. I'm at a loss and need some help. What am I missing or do I need to go in a different direction? Here is my code ...

<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load(page.Server.MapPath("~/Leftmenu.xml"));<br />
<br />
XmlNodeList nodeList;<br />
XmlNode root = doc.DocumentElement;<br />
<br />
nodeList = root.SelectNodes("//MENUITEM");<br />
<br />
foreach (XmlNode node in nodeList)<br />
{<br />
    XmlAttributeCollection attrColl = node.Attributes;<br />
    string strSecurityGroups = attrColl["security"].Value;<br />
<br />
    if (strSecurityGroups != "")<br />
    {<br />
        if (!user.InUserGroup(strSecurityGroups))<br />
        {<br />
            XmlNode parentNode = node.ParentNode;<br />
            parentNode.RemoveChild(node);<br />
            if (!parentNode.HasChildNodes && parentNode.Name != "root")<br />
            {<br />
                XmlNode grandParentNode = parentNode.ParentNode;<br />
                grandParentNode.RemoveChild(parentNode);<br />
                if (!grandParentNode.HasChildNodes && grandParentNode.Name != "root")<br />
                {<br />
                    XmlNode greatParent2Node = grandParentNode.ParentNode;<br />
                    greatParent2Node.RemoveChild(grandParentNode);<br />
                    if (!greatParent2Node.HasChildNodes && greatParent2Node.Name != "root")<br />
                    {<br />
                        XmlNode greatParent3Node = greatParent2Node.ParentNode;<br />
                        greatParent3Node.RemoveChild(greatParent2Node);<br />
                        if (!greatParent3Node.HasChildNodes && greatParent3Node.Name != "root")<br />
                        {<br />
                            XmlNode greatParent4Node = greatParent3Node.ParentNode;<br />
                           greatParent4Node.RemoveChild(greatParent3Node);<br />
                            if (!greatParent4Node.HasChildNodes && greatParent4Node.Name != "root")<br />
                            {<br />
                                XmlNode greatParent5Node = greatParent4Node.ParentNode;<br />
                                greatParent5Node.RemoveChild(greatParent4Node);<br />
                            }<br />
                        }<br />
                    }<br />
                }<br />
            }<br />
        }<br />
    }<br />
}<br />
<br />
StringWriter sw = new StringWriter();<br />
doc.Save(sw);<br />
XmlDataSource xds = new XmlDataSource();<br />
xds.XPath = "root/CATEGORY/CATEGORY";<br />
<br />
xds.Data = sw.ToString();<br />
mnLeft.DataSource = xds;<br />
mnLeft.DataBind();<br />
<br />

QuestionSending HTTP Soap messages Pin
AssemblySoft5-Nov-07 6:19
AssemblySoft5-Nov-07 6:19 
AnswerCross post. Please ignore this thread. Pin
Pete O'Hanlon5-Nov-07 10:16
mvePete O'Hanlon5-Nov-07 10:16 
QuestionHow to access a cookie added by javascript from codebehind in c# Pin
Shaimmaa5-Nov-07 1:46
Shaimmaa5-Nov-07 1:46 
AnswerRe: How to access a cookie added by javascript from codebehind in c# Pin
Michael Sync5-Nov-07 15:30
Michael Sync5-Nov-07 15:30 
QuestionModify and update multiple rows Pin
idsanjeevjha4-Nov-07 17:43
idsanjeevjha4-Nov-07 17:43 
AnswerRe: Modify and update multiple rows Pin
Guffa5-Nov-07 12:40
Guffa5-Nov-07 12:40 
GeneralRe: Modify and update multiple rows Pin
idsanjeevjha5-Nov-07 15:43
idsanjeevjha5-Nov-07 15:43 
AnswerRe: Modify and update multiple rows Pin
idsanjeevjha6-Nov-07 0:34
idsanjeevjha6-Nov-07 0:34 
Questionwindows short cut icon creation Pin
new2pgrmg4-Nov-07 17:42
new2pgrmg4-Nov-07 17:42 
QuestionCalling FileUpload browse button, How ? Pin
hifiger20044-Nov-07 2:40
hifiger20044-Nov-07 2:40 
QuestionRe: Calling FileUpload browse button, How ? Pin
Shog94-Nov-07 6:28
sitebuilderShog94-Nov-07 6:28 
AnswerRe: Calling FileUpload browse button, How ? Pin
hifiger20045-Nov-07 3:42
hifiger20045-Nov-07 3:42 
GeneralRe: Calling FileUpload browse button, How ? Pin
Shog95-Nov-07 7:13
sitebuilderShog95-Nov-07 7:13 
GeneralRe: Calling FileUpload browse button, How ? Pin
hifiger20046-Nov-07 1:19
hifiger20046-Nov-07 1:19 
AnswerRe: Calling FileUpload browse button, How ? Pin
Michael Sync4-Nov-07 19:30
Michael Sync4-Nov-07 19:30 
QuestionPerformance Issue Pin
militiaware3-Nov-07 23:23
militiaware3-Nov-07 23:23 
AnswerRe: Performance Issue Pin
Christian Graus3-Nov-07 23:46
protectorChristian Graus3-Nov-07 23:46 

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.