|
Hi
Replace the following code in the cs file inside the Menu condition
<code>
strRender.Append("<script type=\"text/javascript\" language=\"JavaScript1.2\">");
string MainMenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuFontColor"];
string MainMenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuShadowColor"];
string MainMenubGColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenubGColor"];
string MainMenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuMouseoverColor"];
string SubmenuBgColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBgColor"];
string SubmenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseoverColor"];
string SubmenuBorderColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBorderColor"];
string SubmenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuFontColor"];
string SubmenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuShadowColor"];
string SubmenuMouseOverFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseOverFontColor"];
strRender.Append("stm_bm([\"phpjchr\",400,\"\",\"blank.gif\",0,\"\",\"\",0,0,0,0,50,1,0,0,\"\",\"\",0],this);");
DataView myDataView = new DataView(myXmlDataDocument.DataSet.Tables["MainMenu"]);
myDataView.Sort = "MenuSequence";
if(Display=="V" || Display=="v")
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+"\"]);");
else if(Display=="H" || Display=="h")
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+"\"]);");
for (int i = 0; i < myDataView.Count; i++){
if(isAuthorised(myDataView[i]["MainSecurity"].ToString(),SecurityType)){
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]);");
DataView mySubDataView = new DataView(myXmlDataDocument.DataSet.Tables["SubMenu"]);
mySubDataView.Sort = "SubMenuSequence";
mySubDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString();
if(Display=="V" || Display=="v")
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+"\"]);");
else if(Display=="H" || Display=="h")
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+"\"]);");
for (int j = 0; j < mySubDataView.Count; j++){
if(isAuthorised(mySubDataView[j]["Security"].ToString(),SecurityType)){
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+"\"]);");
/*********************************************************************************/
DataView myLeafDataView = new DataView(myXmlDataDocument.DataSet.Tables["LeafMenu"]);
//myLeafDataView.Sort = "LeafMenuSequence";
myLeafDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString() +" and SubMenuId = " + mySubDataView[j]["SubMenuID"].ToString() ;
HttpContext.Current.Response.Write("outer");
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+"\"]);");
for (int k = 0; k < myLeafDataView.Count; k++){
if(isAuthorised(myLeafDataView[k]["Security"].ToString(),SecurityType)){
HttpContext.Current.Response.Write("forwech");
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+"\"]);");
}
}
strRender.Append("stm_ep();");
/*********************************************************************************/
}
}
strRender.Append("stm_ep();");
}
}
strRender.Append("stm_em();");
strRender.Append("</script>");</code>
Replace the contents of XSd file with
<code><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="Menu" type="menuType"/>
<xsd:complexType name="menuType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="MainMenu" type="mainMenuType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="mainMenuType">
<xsd:sequence>
<xsd:element name="SubMenu" type="SubMenuType"/>
<xsd:sequence>
<xsd:element name="LeafMenu" type="LeafMenuType"/>
</xsd:sequence>
</xsd:sequence>
<xsd:attribute name="MenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="MenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="MainSecurity" type="xsd:string"/>
<xsd:attribute name="BaseURL" type="xsd:string"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="SubMenuType">
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="SubMenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="URL" type="xsd:string"/>
<xsd:attribute name="URLTarget" type="xsd:string"/>
<xsd:attribute name="Security" type="xsd:string"/>
<xsd:attribute name="CongSpecific" type="xsd:string"/>
<xsd:attribute name="MenuID" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="LeafMenuType">
<xsd:attribute name="LeafMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="LeafMenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="URL" type="xsd:string"/>
<xsd:attribute name="URLTarget" type="xsd:string"/>
<xsd:attribute name="Security" type="xsd:string"/>
<xsd:attribute name="MenuID" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
</xsd:schema></code>
and the xml file should be
<code><MainMenu Label="Query Builder" BaseURL="Querybuilder.aspx" MenuID="2" MainSecurity="A" MenuSequence="2" ImageUrl="themes/triangle_blueS.gif">
<SubMenu Label="Query Maintanence" URL="Query.aspx" MenuID="2" Security="A" SubMenuID="1" SubMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<LeafMenu Label="Create Query" URL="CreateQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<LeafMenu Label="Run Query" URL="RunQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<SubMenu Label="View Query" URL="ViewQuery.aspx" MenuID="2" Security="A" SubMenuID="2" SubMenuSequence="2" ImageUrl="themes/xp_newfolder.gif"/>
</MainMenu></code>
it should work file.
Venky
|
|
|
|
|
Anyone get this working? I'm having a problem. The changes suggested seem logical, but don't appear to work.
I've attempted to modify the source as instructed, but it seems to have only disabled the menu function completely. The tree appears to work, but fails to display the leafmenu elements.
Can you point me to a working source with 3 levels? If you think I've simply mixed up the source I can tell you I've done:
1) download and unzip the package from codeproject.com
2) Modified the Fourinone.cs file (the "Render" method)
3) Replace the .XSD file
4) Replaced the .XML file
Any help would be appreciated. Thanks.
Rich
|
|
|
|
|
I'm having exactly the same problem - this control is fantastic, and I would love to use it, but I need three levels. Are any working samples available?
Many Thanks,
Nate
|
|
|
|
|
Thank you Venkat!!
It worked for me, however i modified a couple of lines in the part added by venkat to handle the third level (this part is delimited by venkat with /*****) Hope it Helps!!
/*********************************************************************************/
DataView myLeafDataView = new DataView(myXmlDataDocument.DataSet.Tables["LeafMenu"]);
//myLeafDataView.Sort = "LeafMenuSequence";
myLeafDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString() +" and SubMenuId = " + mySubDataView[j]["SubMenuID"].ToString();
//HttpContext.Current.Response.Write("outer");
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+"\"]);");
for (int k = 0; k < myLeafDataView.Count; k++){
if(isAuthorised(myLeafDataView[k]["Security"].ToString(),SecurityType)){
//HttpContext.Current.Response.Write("forwech");
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+"\"]);");
}
}
strRender.Append("stm_ep();");
/*********************************************************************************/
Guillermo Mejía
|
|
|
|
|
Venkat,
The submenu's are somewhat transparent. I need to set them to solid. Can you point out the code that will allow me to set the submenu to a solid color?
Thanks
David Jenkins
|
|
|
|
|
David,
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=1.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
find the above line in the cs file. Chnage the value 71 to some other number. give 0 for opaque. 100 for pure transparent.
Venky
|
|
|
|
|
I have created a log of what I have done to try and get the control to work for me. I am pretty good at getting around in VS and a new C# programmer. I am using Visual Studio 2003 vs. 7.1.3088.
Log
Download – extract
create virtual directory – browse
login page default.aspx OK
login with admin/admin
Done – no redirect. Unable to login.
Visual Studio 2003
New Project – Existing Folder
Name = Fourinone
Show All Files – include in Project
Open controls.aspx
Error: No class associated with file – create one now?
Solution: Yes – creates controls.aspx.cs
Open default.aspx
Error: File could not be loaded into web form designer. Please correct… The @Page or @Control contains a src= …
Solution: remove src= replace with Codebehind=default.aspx.cs
Also: tag should be after directives and above
Browse Project in PWM (IIS)
Server Error in '/' Application.
-----------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Login'.
Source Error:
Line 1: <%@ Page Language="C#" Debug="true" Trace="false" inherits="Login" Codebehind="Default.aspx.cs"%>
Line 2:
Line 3:
Source File: C:\etc\ComboControl\Default.aspx Line: 1
-----------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Solution: Change inherits to _default, Fourinone._default, fourinone.default, etc – nothing works so move on.
Debug(F5)
Error: Visual Studio cannot debug the project because the debug target fourinone.exe is missing. Please build the Project and retry.
Solution: Build Solution and Build Project – same response in regards to the missing target.
Build Solution:
Error: Style and style attributes not recognized.
Solution: Add (appropriate to your project) meta tags or you will get errors regarding style attributes.
Error: c:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll Referenced class 'System.Xml.XmlDataDocument' has base class or interface 'System.Xml.XmlDocument' defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml'.
This is where I am unable to move forward, the code looks OK to me. Please help Venkat or any more experienced Visual Studio .NET C# programmers who have successfully implemented this control.
I also tried using the control in an existing project and creating a new project by adding FOURINONE.dll, helper/, themes, etc as ‘How I use the control’ suggested (Thank you - very clear). I then created my own web user control using your FOURINONE.cs as the Codebehind (with tweaks) and I get an error in reference to the same Xml.XmlDocument and Xml.XmlDataDocument classes.
Thanks in advance for your help !
|
|
|
|
|
I'm having trouble getting the tab to work correctly. Is there a bug in the code? I saw references to 'MainMenu_Id'. I fixed that particular issue but something else seems to be off .. not sure what.
Is there a new version of the code available?
thanks
ap
|
|
|
|
|
Is there any way to change the font type and size?
Thanks
|
|
|
|
|
You can change the Font
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 Arial\",\"8pt Arial\",0,0]);");
search for this line in the cs file. change the 8pt Arial to your desired font and size.
David
|
|
|
|
|
Venkat,
The controls you created work very nicely. Thanks for releasing these to the public. I do have a couple of questions though:
1. How do I change the font of the menu or submenu?
2. Is it possible for me to control the speed of the drop down menu?
Thanks again!
David Jenkins
|
|
|
|
|
HI David,
You can change the Font
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 Arial\",\"8pt Arial\",0,0]);");
search for this line in the cs file. change the 8pt Arial to your desired font and size.
To change the speed
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=1.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
change the value 10 in the above line in cs file and compile. it should work.
Venky
|
|
|
|
|
Venky,
I was successful in getting the Font to change size but I could not change the speed in which the submenu appears. I changed the 10 to several diffrent values (1,20 and 190) then recompiled the cs file, and none of those values seemed to make any difference. Any futher suggestions?
David
|
|
|
|
|
Here is the new line of code:
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=1.00)\",-2,\"\",-2,1,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
After the change I recompiled the cs file to create new .dll
As you can see I changed the 10 to a 1. I would of thought the submenu dropdown speed would of increased but I can't see any difference in speed.
Any Suggestions?
David Jenkins
|
|
|
|
|
Here is the new line of code:
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=1.00)\",-2,\"\",-2,1,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
After the change I recompiled the cs file to create new .dll
As you can see I changed the 10 to a 1. I would of thought the submenu dropdown speed would of increased but I can't see any difference in speed.
Any Suggestions?
David
|
|
|
|
|
Try changing 'Duration=1.00' to 'Duration=0.5' (this should speed up the control)
ap
|
|
|
|
|
Thanks ap. That worked. Changing the duration to 0.50 made the menu's a little snappier.
David
|
|
|
|
|
I downloaded your control and unzipped the zip file but I am not too sure how to implement it. I am using VS 2005 – Beta 1 (which doesn’t have the concept of project). I copied FOURINONE.DLL to my BIN directory and added reference to it by Add Reference. Now I want to have your control available on the ToolBox. How do I do that? In addition to this, I am assuming that I’ll need helper directories. Where do I copy them?
|
|
|
|
|
How I use the control.
1. Drop the helper and themes folders into your website folder (at the same level as the bin directory)
2. Drop the FOURINONE.dll into the bin folder located in your website folder.
3. Open the web.config file and add a section
<appSettings>
<add key="MenuXMLPath" value="/helper/" />
<add key="MainMenuFontColor" value="#ffffff" />
<add key="MainMenuShadowColor" value="#999999" />
<add key="MainMenubGColor" value="#000088" />
<add key="MainMenuMouseoverColor" value="#000088" />
<add key="SubmenuBgColor" value="#99CCFF" />
<add key="SubmenuMouseoverColor" value="#ffffff" />
<add key="SubmenuBorderColor" value="#0000cc" />
<add key="SubmenuFontColor" value="#000000" />
<add key="SubmenuMouseOverFontColor" value="#000000" />
<add key="SubmenuShadowColor" value="#666666" />
</appSettings>
The appSettings section should be located between the <configuration> and </configuration> section of web.config
4. At the top of each .aspx file that will have a menu place the directive
<%@ Register TagPrefix="fino" Namespace="Controls" Assembly="FOURINONE"%>
5. in each of the .aspx files specify what type of menu you would like, i.e., to place a horizontal menu use
<div style="Z-INDEX: 101; LEFT: 5px; POSITION: absolute; TOP: 33px">
<fino:FourinOne runat="server" Display="H" Controltype="menu" ID="Fourinone" NAME="Fourinone" />
</div>
I place the control between a div statement so as to position it.
6. Open the Data.xml file located in the helper folder and define what you want your menu to look like., I.E.,
<Menu>
<MainMenu Label="MyMenu" BaseURL="" MenuID="1" MainSecurity="U" MenuSequence="1" ImageUrl="themes/triangle_blueS.gif">
<SubMenu Label="SubMenu 1" URL="SubMenu1.aspx" MenuID="1" Security="U" SubMenuID="1" SubMenuSequence="1" CongSpecific="Y" ImageUrl="themes/xp_documents.gif"/>
<SubMenu Label="SubMenu 2" URL="SubMenu2.aspx" MenuID="1" Security="U" SubMenuID="2" SubMenuSequence="2" CongSpecific="Y" ImageUrl="images/xp_documents.gif"/>
<SubMenu Label="SubMenu 3" URL="SubMenu3.aspx" MenuID="1" Security="R" SubMenuID="3" SubMenuSequence="3" CongSpecific="Y" ImageUrl="themes/xp_documents.gif"/>
</MainMenu>
<MainMenu Label="MyMenu 2" BaseURL="" MenuID="2" MainSecurity="A" MenuSequence="2" ImageUrl="themes/triangle_blueS.gif">
<SubMenu Label="SubMenu 21" URL="SubMenu21.aspx" MenuID="2" Security="A" SubMenuID="1" SubMenuSequence="1" CongSpecific="N" ImageUrl="themes/xp_documents.gif"/>
</MainMenu>
<MainMenu Label="MyMenu 3" BaseURL="" MenuID="3" MainSecurity="C" MenuSequence="3" ImageUrl="themes/triangle_blueS.gif">
<SubMenu Label="SubMenu 31" URL="SubMenu31.aspx" MenuID="3" Security="C" SubMenuID="2" SubMenuSequence="1" CongSpecific="N" ImageUrl="themes/xp_documents.gif"/>
</MainMenu>
</Menu>
7. Somewhere on your login page you need to set a Session variable called "UserType" i.e.,
Session["UserType"] = "U" will show menus with security "U"
or
Session["UserType"} = "A" will show menus with security "A"
NOTE: The way the control has been developed the UserType must be a single digit, while the MainSecurity and Security attribtes in the xml file can be of the form "U" or "UR" or "URAC"; I would rather
have the xml files security attributes be single numbers "U" or "A" or "R", etc and have my UserType be "U" or "UR" or "URAC" etc. To do that, I modified the control. This allows me to specify what menus
a user can see rather than what users can see a menu.
|
|
|
|
|
Hi David!
Thanks for your tutorial, I really appreciate it. Unfortunately, the step that I'm having the most difficulty with is the part where you summarize, "To do that, I modified the control...".
For me at least, that is exactly where I'm having the problem.
I have attempted to modify the control by doing this:
-- I get the .dll to work correctly in my web page. Then, I open a new project with the the .cs file, make my changes, and then recompile. I then reference the new .dll. ALl of the other code on my webpages is the exact same, but for some reason, the <%@ Register TagPrefix="CONTROL" Namespace="Controls" Assembly="FOURINONE"%> no longer works. Any clue?
Larry
|
|
|
|
|
dloendorf wrote:
5. in each of the .aspx files specify what type of menu you would like, i.e., to place a horizontal menu use
When I tried that, I got "The active schema doesnot support element FourInOne"
|
|
|
|
|
In spite using the same,
I am getting errors indicationg assembly missings,
what may be probable other causes,
if any one help me
thanks in advance
Any systematic work reflects its significance for a long time, Thogh I m not totally against "The Prototyping".So let's discuss in depth.....
|
|
|
|
|
Very nice control - very easy to use.
I found one problem. If I use the smartNavigation="True" tag a postback will cause a javascript error when the menu control tries to re-paint, which leaves the page without the control and every postback after that gives the same javascript error. (I have listed the error below.) If I do not use the smartNavigation tag the postback and re-paint work just fine. This error was generated in IE6.0.
If I use FireFox I do not get the error even if the smartNavigation tag is used. I am assuming FireFox does not use this tag.
Error received:
Java Script Error:
Description:'null' is null or not an object
Source:(the page I am trying to postback)
Line: 34
If I look at line 34 of the page posted back, it reads:
theform.submit();
The whole script in that area is:
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.QuickFind;
}
else {
theform = document.forms["QuickFind"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
Thanks for any help you may be able to provide. I will just use without the smartNavigation tag.
Again - Great Control - David
|
|
|
|
|
Hi David!
I notice that you understand how to easily implement this control, and I notice that a few of us are struggling to get this working on our site. Is there any chance you can give us a quick "how-to" that might enlighten us?
In advance, thank you, oh guru. (hmmm.. I notice that there is no emoticon of someone groveling at another's feet, but if there was one, I'd put it right here. )
Larry
|
|
|
|
|
Excellent work Venky.
I m just testing your product in which i need to know following.
How to execute a javascript function from menu using "ClientSideOnClick" ?
|
|
|
|
|