- Joined
- Oct 25, 2006
- Messages
- 4
- Reaction score
- 0
Hi,
Sort of new with the whole treeview control and I was wondering is there a way to build a treeview menu using my SQL data I pull from a database instead of having to hard code it into the webpage. Pasted below is my current code but what I would like to do is instead make a table in SQL that data can be added or modified to and have it generate the menu according to the data instead. When I try and pull data from my database as a test and put it in the tags I get an error message saying I can't pull data inside of the treeview tags? Thanks for the help,
Mike
<mytree:treeview runat="server" ID="Treeview1" NAME="Treeview1" DefaultStyle="font-family:Microsoft Sans Serif;font-size:12px;padding-top:0px;padding-bottom:0px;margin:0;padding-right:3px;padding-left:3px;border:1px solid #f1f1f1;"
HoverStyle="font-color:#000;font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:#a1a1a1;border:1px solid #cccccc;"
SelectedStyle="font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:white;border:1px solid #cccccc;color:black;"
Indent="15" ShowLines="False" SystemImagesPath="/webctrl_client/1_0/treeimages/" SelectExpands="True">
<mytree:treenode text="Home" Target="fraMiddleTopFrame" NavigateUrl="./home.aspx" />
<mytree:treenode text="About District Construction">
<mytree:treenode text="Downloads">
<mytree:treenode text="Best Practices">
<mytree:treenode text="Business Impacts 05/03" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/best practices for business impactsJan 9 04.doc" />
<mytree:treenode text="Consultant Preconstruction Activities 12/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/CEI Preconstruction Activities.doc" />
<mytree:treenode text="Estimating Contract Time">
<mytree:treenode text="10/92" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Estimating Contract Time.pdf" />
<mytree:treenode text="02/98" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Construction Time Data Analysis.pdf" />
</mytree:treenode>
<mytree:treenode text="Offer of Final Payment Presentation 11/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/FE OFP Presentation.ppt" />
<mytree:treenode text="Reflective Pavement Markers 02/06" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/RPM Best Practices 022206.doc" />
</mytree:treenode>
<mytree:treenode text="Business Plans">
<mytree:treenode text="FY 2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstructionall_106.xls" />
<mytree:treenode text="Traffic Operations Tier 3">
<mytree:treenode text="2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/2006 TO Business Plan.xls" />
<mytree:treenode text="2005" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstruction105a.xls" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Contract Compliance">
<mytree:treenode text="RCS's Notice to District of Project Assignment & Request for Bulletin Board Project"
Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Notification of compliance assignment.doc" />
<mytree:treenode text="Classifications in the New OJT Program" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Trainee Job Classif WITH EEO CATEGORIES.xls" />
</mytree:treenode>
<mytree:treenode text="DRB Procedures" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/DRB Website Procedures.doc" />
<mytree:treenode text="Matrix Performance Report" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Matrix _Sept 14, 2006_HP.doc" />
<mytree:treenode text="Plans Review" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Contract Time Pending (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/Contract Time Pending (By Date Due).pdf" />
<mytree:treenode text="Pending Plans Review (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/Plan Reviews_ Pending (By Due Date).pdf" />
<mytree:treenode text="Supplemental Agreement Requirements (District IV)" Target="fraMiddleTopFrame"
NavigateUrl="./Downloads/D-4 SA Training version4rev.ppt" />
<mytree:treenode text="TCP Approval Pending" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/TCP Approval Pending.pdf" />
</mytree:treenode>
<mytree:treenode text="Rail Pre-Construction Checklist" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Rail Pre-construction checklist revised 121404xls.xls" />
<mytree:treenode text="Railroad Pre-Construction Document" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Precon mtg r_road c_list.doc" />
</mytree:treenode>
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx">
<mytree:treenode text="Contract Compliance Forms/Reports" Target="fraMiddleTopFrame" NavigateUrl="./ContComplianceLinkInfo.aspx" />
</mytree:treenode>
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="Our Vision/Mission/Values" Target="fraMiddleTopFrame" NavigateUrl="./MissionVision.aspx" />
<mytree:treenode text="Progress Reports" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Broward" Target="_top" NavigateUrl="http://dotsd4hqweb/d4 ftlauderdale/FLmpr.htm" />
<mytree:treenode text="Indian River" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/indian_river_county.htm" />
<mytree:treenode text="Martin" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/martin_county.htm" />
<mytree:treenode text="Palm Beach" Target="_top" NavigateUrl="\\dotsd4pbfs\shared\Construction\Monthly Progress Reports\mprs.htm" />
<mytree:treenode text="St. Lucie" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/stlucie_county.htm" />
</mytree:treenode>
<mytree:treenode text="SiteManager" Target="fraMiddleTopFrame" NavigateUrl="http://www.dot.state.fl.us/construction/trnsport/2002_SM_Manual/2002 NEW User Handbook.pdf" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
</mytree:treenode>
<mytree:treenode text="District Maintenance" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/d4 maintenance/d4nethome.htm" />
<mytree:treenode text="District Materials Office" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/MatWeb-C/index.htm" />
<mytree:treenode text="Operations Centers">
<mytree:treenode text="Broward" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb/d4 ftlauderdale/index.htm" />
<mytree:treenode text="Treasure Coast" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/FT_PIERCE/index.htm" />
<mytree:treenode text="Palm Beach" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/wpb/index.htm" />
</mytree:treenode>
<mytree:treenode text="Operations Training" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/operations training/index.htm" />
<mytree:treenode text="P.E. Trainee" Target="_top" NavigateUrl="http://dotsd4hqweb/d4 PE-Trainee/" />
<mytree:treenode text="Contacts">
<mytree:treenode text="District IV Construction" target="fraMiddleTopFrame" NavigateUrl="./DistrictConstruction.aspx">
<mytree:treenode text="Director of Operations" target="fraMiddleTopFrame" NavigateUrl="./Director.aspx" />
<mytree:treenode text="Phone and Email List" target="fraMiddleTopFrame" NavigateUrl="./PhoneList.aspx" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Links">
<mytree:treenode text="District IV Net" target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/" />
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="INFONET" target="_top" NavigateUrl="http://infonet/" />
<mytree:treenode text="MyFlorida" target="_top" NavigateUrl="http://www.myflorida.com/" />
<mytree:treenode text="People First" target="_top" NavigateUrl="https://peoplefirst.myflorida.com/logon.htm" />
<mytree:treenode text="Project Suite" target="_top" NavigateUrl="http://dotsd4hqprodweb.dot.state.fl.us/TD_Main.asp" />
<mytree:treenode text="State Construction Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/construction/" />
<mytree:treenode text="State Maintenance Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statemaintenanceoffice/" />
<mytree:treenode text="State Materials Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statematerialsoffice/" />
</mytree:treenode>
</mytree:treeview>
Sort of new with the whole treeview control and I was wondering is there a way to build a treeview menu using my SQL data I pull from a database instead of having to hard code it into the webpage. Pasted below is my current code but what I would like to do is instead make a table in SQL that data can be added or modified to and have it generate the menu according to the data instead. When I try and pull data from my database as a test and put it in the tags I get an error message saying I can't pull data inside of the treeview tags? Thanks for the help,
Mike
<mytree:treeview runat="server" ID="Treeview1" NAME="Treeview1" DefaultStyle="font-family:Microsoft Sans Serif;font-size:12px;padding-top:0px;padding-bottom:0px;margin:0;padding-right:3px;padding-left:3px;border:1px solid #f1f1f1;"
HoverStyle="font-color:#000;font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:#a1a1a1;border:1px solid #cccccc;"
SelectedStyle="font-size:12px;font-family:Microsoft Sans Serif;padding-left:3px;padding-right:3px;background-color:white;border:1px solid #cccccc;color:black;"
Indent="15" ShowLines="False" SystemImagesPath="/webctrl_client/1_0/treeimages/" SelectExpands="True">
<mytree:treenode text="Home" Target="fraMiddleTopFrame" NavigateUrl="./home.aspx" />
<mytree:treenode text="About District Construction">
<mytree:treenode text="Downloads">
<mytree:treenode text="Best Practices">
<mytree:treenode text="Business Impacts 05/03" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/best practices for business impactsJan 9 04.doc" />
<mytree:treenode text="Consultant Preconstruction Activities 12/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/CEI Preconstruction Activities.doc" />
<mytree:treenode text="Estimating Contract Time">
<mytree:treenode text="10/92" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Estimating Contract Time.pdf" />
<mytree:treenode text="02/98" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Construction Time Data Analysis.pdf" />
</mytree:treenode>
<mytree:treenode text="Offer of Final Payment Presentation 11/05" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/FE OFP Presentation.ppt" />
<mytree:treenode text="Reflective Pavement Markers 02/06" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/RPM Best Practices 022206.doc" />
</mytree:treenode>
<mytree:treenode text="Business Plans">
<mytree:treenode text="FY 2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstructionall_106.xls" />
<mytree:treenode text="Traffic Operations Tier 3">
<mytree:treenode text="2006" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/2006 TO Business Plan.xls" />
<mytree:treenode text="2005" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/BusinessPlanConstruction105a.xls" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Contract Compliance">
<mytree:treenode text="RCS's Notice to District of Project Assignment & Request for Bulletin Board Project"
Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Notification of compliance assignment.doc" />
<mytree:treenode text="Classifications in the New OJT Program" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Trainee Job Classif WITH EEO CATEGORIES.xls" />
</mytree:treenode>
<mytree:treenode text="DRB Procedures" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/DRB Website Procedures.doc" />
<mytree:treenode text="Matrix Performance Report" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Matrix _Sept 14, 2006_HP.doc" />
<mytree:treenode text="Plans Review" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Contract Time Pending (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/Contract Time Pending (By Date Due).pdf" />
<mytree:treenode text="Pending Plans Review (by Due Date)" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/Plan Reviews_ Pending (By Due Date).pdf" />
<mytree:treenode text="Supplemental Agreement Requirements (District IV)" Target="fraMiddleTopFrame"
NavigateUrl="./Downloads/D-4 SA Training version4rev.ppt" />
<mytree:treenode text="TCP Approval Pending" Target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/D4 hqconst/TCP Approval Pending.pdf" />
</mytree:treenode>
<mytree:treenode text="Rail Pre-Construction Checklist" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Rail Pre-construction checklist revised 121404xls.xls" />
<mytree:treenode text="Railroad Pre-Construction Document" Target="fraMiddleTopFrame" NavigateUrl="./Downloads/Precon mtg r_road c_list.doc" />
</mytree:treenode>
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx">
<mytree:treenode text="Contract Compliance Forms/Reports" Target="fraMiddleTopFrame" NavigateUrl="./ContComplianceLinkInfo.aspx" />
</mytree:treenode>
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="Our Vision/Mission/Values" Target="fraMiddleTopFrame" NavigateUrl="./MissionVision.aspx" />
<mytree:treenode text="Progress Reports" Target="fraMiddleTopFrame" NavigateUrl="">
<mytree:treenode text="Broward" Target="_top" NavigateUrl="http://dotsd4hqweb/d4 ftlauderdale/FLmpr.htm" />
<mytree:treenode text="Indian River" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/indian_river_county.htm" />
<mytree:treenode text="Martin" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/martin_county.htm" />
<mytree:treenode text="Palm Beach" Target="_top" NavigateUrl="\\dotsd4pbfs\shared\Construction\Monthly Progress Reports\mprs.htm" />
<mytree:treenode text="St. Lucie" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/Ft_PIERCE/stlucie_county.htm" />
</mytree:treenode>
<mytree:treenode text="SiteManager" Target="fraMiddleTopFrame" NavigateUrl="http://www.dot.state.fl.us/construction/trnsport/2002_SM_Manual/2002 NEW User Handbook.pdf" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
</mytree:treenode>
<mytree:treenode text="District Maintenance" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/d4 maintenance/d4nethome.htm" />
<mytree:treenode text="District Materials Office" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/MatWeb-C/index.htm" />
<mytree:treenode text="Operations Centers">
<mytree:treenode text="Broward" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb/d4 ftlauderdale/index.htm" />
<mytree:treenode text="Treasure Coast" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/FT_PIERCE/index.htm" />
<mytree:treenode text="Palm Beach" target="fraMiddleTopFrame" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/wpb/index.htm" />
</mytree:treenode>
<mytree:treenode text="Operations Training" Target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/operations training/index.htm" />
<mytree:treenode text="P.E. Trainee" Target="_top" NavigateUrl="http://dotsd4hqweb/d4 PE-Trainee/" />
<mytree:treenode text="Contacts">
<mytree:treenode text="District IV Construction" target="fraMiddleTopFrame" NavigateUrl="./DistrictConstruction.aspx">
<mytree:treenode text="Director of Operations" target="fraMiddleTopFrame" NavigateUrl="./Director.aspx" />
<mytree:treenode text="Phone and Email List" target="fraMiddleTopFrame" NavigateUrl="./PhoneList.aspx" />
<mytree:treenode text="Training" Target="fraMiddleTopFrame" NavigateUrl="./ConstructionTraining.aspx" />
<mytree:treenode text="Contract Compliance" Target="fraMiddleTopFrame" NavigateUrl="./ContractCompliance.aspx" />
</mytree:treenode>
</mytree:treenode>
<mytree:treenode text="Links">
<mytree:treenode text="District IV Net" target="_top" NavigateUrl="http://dotsd4hqweb.d4b.dot.state.fl.us/" />
<mytree:treenode text="I-95 Mobility Website" target="_top" NavigateUrl="http://www.i95wpb.com/" />
<mytree:treenode text="INFONET" target="_top" NavigateUrl="http://infonet/" />
<mytree:treenode text="MyFlorida" target="_top" NavigateUrl="http://www.myflorida.com/" />
<mytree:treenode text="People First" target="_top" NavigateUrl="https://peoplefirst.myflorida.com/logon.htm" />
<mytree:treenode text="Project Suite" target="_top" NavigateUrl="http://dotsd4hqprodweb.dot.state.fl.us/TD_Main.asp" />
<mytree:treenode text="State Construction Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/construction/" />
<mytree:treenode text="State Maintenance Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statemaintenanceoffice/" />
<mytree:treenode text="State Materials Office" target="_top" NavigateUrl="http://www.dot.state.fl.us/statematerialsoffice/" />
</mytree:treenode>
</mytree:treeview>
Last edited: