July 17th, 2009, 10:29 AM
I am making an admin page that modifies other pages on the site.
I'd really just like some feedback on my logic as I'm stuck and am still a beginner.
Ok so the page I made modifies the Links page of our site (A page with a list of important links)
My manager wanted to be able to change the links on this page simply without dealing with code.
I currently have a site that the use can input, Link Title, URL, and then update the links page.
Now on our main page there is also a small section with the 'Top Links' from the link page.
On my Modify Links Page, I have created a check box below each input link area but am now stuck.
How would I write a function that performed this action, or does this logic make sense?
If Checkbox is checked
Show on main page
I'm sorry if this question is too broad or unclear. Thanks for any help in advance.
July 17th, 2009, 10:37 AM
Re: Checkbox Help
Well my advise is to either store all the links in a database or xml file. Make sure to include whether its checked or not. Then when you're displaying the links on the page you can filter out all the ones which are not checked.
Assuming your xml looked like this.
You could use the following code to get only the list of links that are checked
XmlDocument xml = new XmlDocument();
XmlNodeList activeLinks = xml.SelectNodes("links/link[@checked='true']");
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!