Hi
Replace the following code in the cs file inside the Menu condition
<br />
strRender.Append("<script type=\"text/javascript\" language=\"JavaScript1.2\">");<br />
string MainMenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuFontColor"];<br />
string MainMenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuShadowColor"];<br />
string MainMenubGColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenubGColor"];<br />
string MainMenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuMouseoverColor"];<br />
string SubmenuBgColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBgColor"];<br />
string SubmenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseoverColor"];<br />
string SubmenuBorderColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBorderColor"];<br />
string SubmenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuFontColor"];<br />
string SubmenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuShadowColor"];<br />
string SubmenuMouseOverFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseOverFontColor"];<br />
<br />
<br />
<br />
strRender.Append("stm_bm([\"phpjchr\",400,\"\",\"blank.gif\",0,\"\",\"\",0,0,0,0,50,1,0,0,\"\",\"\",0],this);");<br />
DataView myDataView = new DataView(myXmlDataDocument.DataSet.Tables["MainMenu"]);<br />
myDataView.Sort = "MenuSequence";<br />
if(Display=="V" || Display=="v")<br />
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");<br />
else if(Display=="H" || Display=="h")<br />
strRender.Append("stm_bp(\"p0\",[0,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");<br />
for (int i = 0; i < myDataView.Count; i++){<br />
if(isAuthorised(myDataView[i]["MainSecurity"].ToString(),SecurityType)){<br />
strRender.Append("stm_ai(\"p0i0\",[0,'"+myDataView[i]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+myDataView[i]["BaseURL"].ToString()+"\",\"_self\",'"+myDataView[i]["BaseURL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"arrow_gray.gif\",\"arrow_gray.gif\",7,7,0,0,1,\""+MainMenubGColor+"\",0,\""+MainMenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\""+MainMenubGColor+"\",\""+MainMenuMouseoverColor+"\",\""+MainMenuFontColor+"\",\""+MainMenuFontColor+"\",\"8pt bold Arial\",\"8pt bold Arial\",0,0]);");<br />
DataView mySubDataView = new DataView(myXmlDataDocument.DataSet.Tables["SubMenu"]);<br />
mySubDataView.Sort = "SubMenuSequence";<br />
mySubDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString();<br />
if(Display=="V" || Display=="v")<br />
strRender.Append("stm_bp(\"p1\",[1,2,0,1,0,3,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");<br />
else if(Display=="H" || Display=="h")<br />
strRender.Append("stm_bp(\"p1\",[1,4,0,1,0,3,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");<br />
for (int j = 0; j < mySubDataView.Count; j++){<br />
if(isAuthorised(mySubDataView[j]["Security"].ToString(),SecurityType)){<br />
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+mySubDataView[j]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+mySubDataView[j]["URL"].ToString()+"\",\"\",'"+mySubDataView[j]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");<br />
<br />
DataView myLeafDataView = new DataView(myXmlDataDocument.DataSet.Tables["LeafMenu"]);<br />
myLeafDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString() +" and SubMenuId = " + mySubDataView[j]["SubMenuID"].ToString() ;<br />
HttpContext.Current.Response.Write("outer");<br />
<br />
strRender.Append("stm_bp(\"p1\",[1,2,0,1,0,4,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");<br />
for (int k = 0; k < myLeafDataView.Count; k++){<br />
if(isAuthorised(myLeafDataView[k]["Security"].ToString(),SecurityType)){<br />
HttpContext.Current.Response.Write("forwech");<br />
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+myLeafDataView[k]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+myLeafDataView[k]["URL"].ToString()+"\",\"\",'"+myLeafDataView[k]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");<br />
}<br />
}<br />
strRender.Append("stm_ep();"); <br />
<br />
<br />
<br />
}<br />
}<br />
strRender.Append("stm_ep();");<br />
}<br />
}<br />
strRender.Append("stm_em();");<br />
strRender.Append("</script>");
Replace the contents of XSd file with
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><br />
<br />
<xsd:element name="Menu" type="menuType"/><br />
<br />
<xsd:complexType name="menuType"><br />
<xsd:sequence maxOccurs="unbounded"><br />
<xsd:element name="MainMenu" type="mainMenuType"/><br />
</xsd:sequence><br />
</xsd:complexType><br />
<br />
<xsd:complexType name="mainMenuType"><br />
<xsd:sequence><br />
<xsd:element name="SubMenu" type="SubMenuType"/><br />
<xsd:sequence><br />
<xsd:element name="LeafMenu" type="LeafMenuType"/><br />
</xsd:sequence><br />
</xsd:sequence><br />
<br />
<xsd:attribute name="MenuID" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="MenuSequence" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="MainSecurity" type="xsd:string"/><br />
<xsd:attribute name="BaseURL" type="xsd:string"/><br />
<xsd:attribute name="Label" type="xsd:string"/><br />
<xsd:attribute name="ImageUrl" type="xsd:string"/><br />
</xsd:complexType><br />
<br />
<xsd:complexType name="SubMenuType"> <br />
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="SubMenuSequence" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="Label" type="xsd:string"/><br />
<xsd:attribute name="URL" type="xsd:string"/><br />
<xsd:attribute name="URLTarget" type="xsd:string"/><br />
<xsd:attribute name="Security" type="xsd:string"/><br />
<xsd:attribute name="CongSpecific" type="xsd:string"/><br />
<xsd:attribute name="MenuID" type="xsd:string"/><br />
<xsd:attribute name="ImageUrl" type="xsd:string"/><br />
</xsd:complexType> <br />
<br />
<xsd:complexType name="LeafMenuType"> <br />
<xsd:attribute name="LeafMenuID" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="LeafMenuSequence" type="xsd:nonNegativeInteger"/><br />
<xsd:attribute name="Label" type="xsd:string"/><br />
<xsd:attribute name="URL" type="xsd:string"/><br />
<xsd:attribute name="URLTarget" type="xsd:string"/><br />
<xsd:attribute name="Security" type="xsd:string"/> <br />
<xsd:attribute name="MenuID" type="xsd:string"/><br />
<xsd:attribute name="ImageUrl" type="xsd:string"/><br />
</xsd:complexType> <br />
<br />
</xsd:schema>
and the xml file should be
<MainMenu Label="Query Builder" BaseURL="Querybuilder.aspx" MenuID="2" MainSecurity="A" MenuSequence="2" ImageUrl="themes/triangle_blueS.gif"><br />
<SubMenu Label="Query Maintanence" URL="Query.aspx" MenuID="2" Security="A" SubMenuID="1" SubMenuSequence="1" ImageUrl="themes/xp_documents.gif"/><br />
<LeafMenu Label="Create Query" URL="CreateQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/><br />
<LeafMenu Label="Run Query" URL="RunQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/><br />
<SubMenu Label="View Query" URL="ViewQuery.aspx" MenuID="2" Security="A" SubMenuID="2" SubMenuSequence="2" ImageUrl="themes/xp_newfolder.gif"/><br />
</MainMenu>
it should work file.
Venky
|