|
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" ?
|
|
|
|
|
your value for the URL attribute in the XML file should be "javscript:functionName();"
Ken
|
|
|
|
|
Could someone provide a full "tutorial'ish" sample of how to implement the 4-in-1 combo control?
Don't know where or how to start, really.
thx
JJ
|
|
|
|
|
I really love your FourInOne web control. It looks very slick. Thanks for releasing it!
Unfortunately, I'm having a difficult time implementing it. I got it running with your .dll perfectly, but I can't figure out how to change the settings in your FOURINONE.cs file. (the redirect page).
Here are the steps I took to modify your .dll:
1) I created a new project, with the FOURINONE.cs file and webconfig file in it.
2) I made the changes I wanted
3) I rebuilt the file
4) In my real project I referenced the new .dll
5) I used the exact same controls.aspx page that was already working with your .dll.
5) I get this error:
Could not load type Controls.FourinOne from assembly fourinone, Version=1.0.1856.41722, Culture=neutral, PublicKeyToken=null.
from this:
Line 54: <control:fourinone runat="server" display="H" controltype="menu" id="Fourinone" name="Fourinone">
Do you know what I'm missing? In advance, thank you!!!!
I don't know if it is related, but I also notice that I can't add your compiled .dll to my toolbar, and as soon as I copy your code into mine I get an error <can't create="" control="">. These behaviors happened even before I made the changes.
Thank you for any help you can offer!
Larry Piegza
|
|
|
|
|
Hi Larry,
Thanks for trying my control. Very sorry to say i dont have a IDE to create all these stuffs so i dont know how to create it using the VS.Net. I just wrote the code and compliled manually using CSC.exe. You just copy my code into a new project web control project in your IDE. keep the code which is generated by IDE. It should work. Those codes are missing in my control so it throws all these errors.
Sorry for inconvenience
Venky
|
|
|
|
|
Hi Venky!
I've spent another 4-6 hours trying to implement your control, and to be honest, I'm having a miserable time. I might be a rookie -- but I'm trying hard to learn!
Could you do me a huge favor, and add these changes to your project, compile it, and email it to me?
The two changes from a private variable to a public one are so that I can implement this control many differnet times throughout the site using different info, and the second I believe should take care of the fact that when you display it in visual studio it shows an error. In advance, thank you!!!
[ToolboxData("<{0}:FourInOne runat=server>")]Public Class FourinOne
Public document As String = "data.xml"
Public LoginPage As String = "default.aspx"
and then change the reference from "default.aspx" to LoginPage
Thank you!!!!!
Thank you!
Larry Piegza
http://www.onlinecourseevaluations.com
|
|
|
|
|
Does the control support going to 3 levels in the tree or menu?
Great job on this control!!!
Karl
modified 27-Feb-21 21:01pm.
|
|
|
|
|