|
|
Comments and Discussions
|
|
 |

|
Hi Joseph,
I really liked your example and I started to use it and modify it heavily for one of my projects. However, I noticed it does not work in Netscape/Mozilla. The issue seems to be that the Framework will not render the tables and table cells that are dynamically added via code. In other words, all that gets rendered is the panel and the panel's "inner html". The tables supporting the tab and the content "box" are not rendered - not even added to the control's output. The only thing that ever gets rendered are the contents of the panelOutput.
I have never seen anything like that, but this is what is happening. Any ideas on how to efficiently get the rest of the control to render in Netscape/Mozilla?
Thanks,
J.
J Smith
Sr. Software Engineer
Lockheed Martin
|
|
|
|
|

|
I concur that this does not work in firefox. Also in IE7 it does not have the curves.
|
|
|
|

|
I meant to say in FF you can view the content but not the title and header.
|
|
|
|

|
Well I was just looking at this composite control and was I able to find the fix immediately!
In the page OnLoad function, joseph is trying to verify the IE version,less than IE version 5 makes the control not expandable!
Well I just made it true irrespective of the IE version. I just tested the results in FF and the control are coming along perfect with the desired functionality.
I have not tested this code with IE version < 5.
Here is the change!!!
if (!uplevel)
{
Expandable = true;
RenderInBox = true;
}
I hope this helps others!!!
Happy coding!
Amol
|
|
|
|

|
when IE version < 5, drop collapse/expand:
Here is the change;
if ((caps.Browser.ToUpper().IndexOf("IE") > -1)
&& (!uplevel))
{
Expandable = false;
RenderInBox = true;
}
Amol
|
|
|
|

|
First off, great control! I absolutely love it and I know it will save me a lot of time in the future, so thank you. The only problem is that (and I know this question was previously asked but I didn't see an answer) when I click on the minimize button I get a Javascript error "Object Required". I looked at the Source View of the page and the problem is that for some reason "_thePanel" is getting appended to the end of the control's name. So the control gets rendered as: <table id="ctl00_ContentPlaceHolder1_pnlGeneral_thePanel" but the javascript functions use an ID without the "_thePanel" appended as follows: ondblclick="javascript:MinMaxTableCurvePanel('ctl00_ContentPlaceHolder1_pnlGeneral')" I should say that I'm using the control inside the new "<asp:Content>" control in VS 2005. Any help you might be able to provide would be great. Devin
|
|
|
|
|

|
This works in IIS6 with .Net 2.0 with VS2005
Just change the following lines in the ClientSide Javascript.
function MinMaxTableCurvePanel(cntrlId)
{
var closed_TableCurvePanel = document.getElementById(cntrlId).style.display;
if ( closed_TableCurvePanel.toLowerCase() == 'none' )
{
document.getElementById(cntrlId).style.display = '';
//document.getElementById(cntrlId+'_hdnMinimizeState').value=false;
document.getElementById(cntrlId+'_imgPlusMinus').src = 'images/minus.gif';
}
else
{
document.getElementById(cntrlId).style.display = 'none';
//document.getElementById(cntrlId+'_hdnMinimizeState').value = true;
document.getElementById(cntrlId+'_imgPlusMinus').src = 'images/plus.gif';
}
}
This bypasses the hidden field altogether, you don't need it. Use the style.display of the div itself to determine visibility.
Excellent Panel Control!!!
Clift B. Maples
|
|
|
|

|
Hi, have been looking at your panel curve container over the last week.
with the maximise/minimise feature on the heading i was trying to get the minimise image to stay in the location when i click, to maximise the panel. To give contrast to what i mean, in your webform1.aspx for download
its acting like panel curve - custom tab color, when i expand the panel
but i want it to act like panel curve - without print icon, so it stays in the same spot,
what is it that causes it to stay in the same spot?
also would like to have the minimise/maximise to the left of the panel, where abouts to i go2 in your code to modify this feature
|
|
|
|
|

|
I believe I fixed the problem by assigning a width to the centercell of the tab.
int offset = 20;
if (hasPrint)
offset = offset + 20;
if (hasMinimize)
offset = offset + 20;
int centerwidth = (int) this.Width.Value - offset;
centerCell.Style.Add("width",centerwidth.ToString()+"px");
|
|
|
|

|
Andy Moon wrote: I believe I fixed the problem by assigning a width to the centercell of the tab.
int offset = 20;
if (hasPrint)
offset = offset + 20;
if (hasMinimize)
offset = offset + 20;
int centerwidth = (int) this.Width.Value - offset;
centerCell.Style.Add("width",centerwidth.ToString()+"px");
I've tried this but I does not work.
It is a great control, but if this is not going the work, I can't use it.
The problem occurs when you put other html controls (table) inside. If you put only text in it (like just where you put 'content here') it works perfect.
-- modified at 4:49 Thursday 18th October, 2007
What I also tried:
If you put it in a usercontrol a then add tables, textboxes, labels inside the panelCurveContainer, the collapse and expand feature works fine. The plus and minus images stay in the correct region.
|
|
|
|

|
I have found the solution for this problem.
Look for the part of code starting with the following comment:
// Insert the Panel's markup in the table cell {Container}
Comment some code above it
/*int colspan = 3;
if ( hasPrint )
colspan++;
if ( hasMinimize )
colspan++;*/
Аnd change code below it.
Table t2 = new Table();
t2.CellPadding = 0;
t2.CellSpacing = 0;
t2.Width = Unit.Percentage(100); //Width;
t2.HorizontalAlign = HorizontalAlign.Center;
t2.Style.Add("margin", "0 0 0 0px");
TableRow rowBody1 = new TableRow();
if ( bodyBackColor != Color.Transparent )
rowBody1.BackColor = bodyBackColor;
TableCell cellBody = new TableCell();
//cellBody.ColumnSpan = colspan;
cellBody.Text = panelOutput;
cellBody.Style.Add("BORDER","#cccccc 1px solid");
cellBody.Style.Add("padding","0 0 0 0px"); //"0 5 5 5px"
cellBody.Style.Add("margin","0 0 0 0px"); //"0 0 5 0px"
rowBody1.Cells.Add(cellBody);
t2.Rows.Add(rowBody1);
// Output
t.RenderControl(output);
t2.RenderControl(output);
|
|
|
|

|
Hi, I am using the solution provided by you but when I am opening WebForm1.aspx of PanelCurveContainer project in design mode, it is not creating the PanelCurveControl saying "Object Reference not set to an instance of an object." Please needed a help, Very URGENT!!!!
Thanks in Advance,
Tapan Vyas
|
|
|
|

|
Tapas,
If you had gone through entire question-answer section of this page you must have got ur answer . Actually it is missing Design time code implementation, lots of people have requested for this, and i never got time.. but I promise i'll take out time and write a design mode class for this. but trust me it will work even if it is showing error in IDE. So use this in page and open in IE and see how it works.
---------
Tittle
|
|
|
|
|

|
Angelo,
I appreciate your words, surely i'll try to make use of comments you added whenever I get time. That surely helps me.
Have a nice time.
Tittle
---------
Tittle
|
|
|
|

|
thanks Tittle for your quick response, sorry didnt post new thread, just joined up and was keen to get this control implemented.
control comes up ok within my app but when i hit the minimise button it throws
Microsoft JScript runtime error: Object required and it points at this line of code
---->var closed_TableCurvePanel = document.getElementById(cntrlId+'_hdnMinimizeState').value;
which is within function MinMaxTableCurvePanel(cntrlId)
do you know if your control has any complications with the <asp:content> tag, as your control is currently sitting inside this tag on my page.
It works fine on pages without this web control around it.
also was wondering once you include the assembly can you promatically set the tittle web control and attributes
like a normal web control.
cheers
geoff.
-- modified at 0:25 Friday 12th May, 2006
|
|
|
|

|
I checked this control inside DATAGRID, inside any other USER CONTROL, and it worked perfectly fine everywhere. Can you zip and email ur code to me, if i get time i can look into that.
Thanks
---------
Tittle
|
|
|
|

|
I get a JavaScript error whenever I put the panel in a content area of my masterpage. Obviously I am using VS 2005 with Masterpages ... do you know what I can do about it? Have you ever tried it in a content area?
Any help ASAP would really help ... I would love to use this code!
Thanks to anyone who can help!!
Ed
-- modified at 17:09 Friday 14th April, 2006
|
|
|
|

|
I COULD NEVER CHECK THIS IN VS 2005 AND IM NOT SURE EITHER IF IT WILL WORK, WHAT I BELIEVE IS IS THAT THERE MIGHT BE MUCH BETTER APPROACH IN VS.NET 2005
---------
Tittle
|
|
|
|

|
In the demo project,consider the first PanelCurve control which has 2 textboxes. If we minimize the panel, the Title and the image are shifted
right and when we maximize the control they are shifted back.
why is this so ?
Thanks,
|
|
|
|

|
There is slight space problem, and i'm not sure why it comes, but it only comes in a typical scenario not everytime, you may need to re-study html generated to fix this problem.
I'm busy with other things therefore cant fix it now.
---------
Tittle
|
|
|
|

|
I can not get the minimize to work. I am getting a javascript error "object required" Any ideas. Thanks for the work you have done it looks great!
Greg Kuper
|
|
|
|

|
try setting the ID of the control....
|
|
|
|

|
I've tested the application at my end and it works fine. I have IE 6.0.
To debug the error. either insert "debugger;" in the function you are getting error, or let debugger open when error occurs. "Tools/Options/Advanced "
Uncheck "disable script debugging..", check "display a notification error".
---------
Tittle
|
|
|
|

|
What kind of browser compatability does this control have? Is it IE specific, or will it render properly in Firefox/Mozilla/Netscape?
|
|
|
|

|
I just tested it with IE. It might be working with other browsers or it requires little modification to work with them. Please do it urself.
---------
Tittle
|
|
|
|

|
When I try to View In Browser in VS 2005 standard edition, I get the following compilation error: What does this mean?
Server Error in '/PanelCurveContainer' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 44: by Microsoft that offers a single logon and core profile services for member sites.
Line 45: -->
Line 46:
Line 47:
Line 48: <!-- AUTHORIZATION
Source File: C:\- Visual Studio 2005\Curved Collapsible Panel Control\PanelCurveContainer\panelcurvecontainer\web.config Line: 46
Show Additional Configuration Errors:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\- Visual Studio 2005\Curved Collapsible Panel Control\PanelCurveContainer\panelcurvecontainer\web.config line 83)
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|
|
|
|

|
I'm not able to reproduce error at my end. I have vs .net 2003 and it works fine there.
But I can suggest you how to resolve it, ie. open IIS "inetmgr.exe at RUN", right click on virtual directory u created, select properties. There is something called "ApplicationSettings", and there is a button called "Create/Remove" application. Click on "Create" which becomes "Remove" once clicked, if application hasnt been created. You must be able to resolve error now.
---------
Tittle
|
|
|
|

|
I want to display images in validation summary control instead of 3 default display modes : these are 1. bulletted list 2. list 3. Paragraph
|
|
|
|

|
Should this question be really asked here? Anyway I give you answer. Check the view source of html page, it must have generated some thing like below. e.g. <table id="valSum" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><font face="verdana" color="Red" size="3">You must enter a value in the following fields:<ul><li>Card Type. </li><li>Card Number. </li><li>Expiration Date. </li></ul> </font></td></tr></table> now create a style tag in ur page, and provide li image path. e.g. <style> #valSum UL { list-style-image: url(blueball.gif); list-style-type: circle } </style> and this will show images instead of actual bullets. I must have missed here some syntaxes, just typed them down from my old memories, so fix it when you face problem. --------- Tittle
|
|
|
|

|
Mankesh,
Your question do not at all belong to this forum. You should post it somewhere else.
Thanks
---------
Tittle
|
|
|
|

|
Joseph, thanks for your control, it is extremely helpful to me.
I downloaded your demo project and although it runs great in the web browser, in Visual Studio design mode, all I get is "Error Creating Control - Panelcurvecontrol1 (i)". When I hover over the (i) it says "Object reference not set to an instance of an object".
The web form designer generated code #region doesn't show any variables for the PanelCurveControls for WebForm1.aspx.cs.
The same happens when I try to incorporate the control into my own project. The control is compiled and, like I said, it actually works in the web browser -- it is just VS.NET Design Mode that is messed up.
What am I doing wrong?
|
|
|
|

|
I havent given it design support. Providing Design support to a custom control is tedious job in .Net. I was in hurry to release it without design support. Also I use images at corner to form the curve and I dont know image url while I'm in design mode, so it wont be exactly in design mode as it is going to appear on screen. So I dropped it.
---------
Tittle
|
|
|
|

|
Ah, I see. That gave me a hint, though -- if you check to see if HttpContext.Current==null before setting imgPath (and just set it to "" if it's not blank), the control will construct in the designer and at least the controls inside it will still show up, even though the panel itself doesn't render correctly. Thanks.
|
|
|
|

|
Sounds interesting, I'm still confused while in design mode how can be Context.Current could be ever not null? Do you have sample code related with this, I can definitely give design support then.
---------
Tittle
|
|
|
|

|
Search for imgPath and replace with the following for VS support.
if (HttpContext.Current == null)
{
imgPath = "";
}
else
{
imgPath = HttpContext.Current.Request.ApplicationPath + skinName + "/Images/";
}
Mike
|
|
|
|
|

|
hey,
I didnt get time to provide support for design mode. It wont work in design mode right now.
---------
Tittle
|
|
|
|

|
Hi Tittle, your control looks really good and is exactly what i need.
only problem is not sure how to deploy it.
what is the procedure to bring this control into my app.
im using vs2005 and am not really sure what the process is.
Do i compile it into a .dll and include it in my project?
any advice would be great
-- modified at 6:39 Thursday 11th May, 2006
|
|
|
|

|
You should have created a new thread:
Anyway first of all for your information i could test it with .net 2003 and not sure if it breaks in 2005, but still I think it should run.
Download the complete project and it has readme.txt, follow it and you would be able to use the control in any file once you understand that.
DLL will be generated by my control, i'm giv9ng you complete code (.cs) you can use it anywhere.
---------
Tittle
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
An ASP.NET custom panel control which is curved on the corners, could be minimized/maximized, displayed as a nugget, and can work as a container for anything.
| Type | Article |
| Licence | CPOL |
| First Posted | 15 Nov 2005 |
| Views | 126,856 |
| Bookmarked | 101 times |
|
|