473,800 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#/ASP.NET: Panel border does not paint...

115 New Member
This is a weird one. I have a page that has two Panels on it with BorderStyle set to double. In design mode everything looks as it should. When I start the page up or move it to a production server, the borders on the Panel do not show up unless you first minimize the browser and bring it back up or move a window over it/force the window to repaint. I thought maybe it was just my comp but i see it on any IE6 computer. Firefox and Safari paint the border no problem.

Has anyone seen this before??


[HTML] <asp:Panel ID="Panel1" runat="server" BorderStyle="Do uble" Height="185px" Style="left: 27px; position: absolute; top: 163px; z-index: 101;" Width="335px">

<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 3px; position: absolute; top: 8px; text-align: center;" Text="Candidate s by specialty" Width="330px" />

<select id="sel_special ty" runat="server" style="position : absolute; left: 62px; width: 212px; top: 33px;">
</select>

<input type="button" id="btn_special ty_report" runat="server" value="Show All" style="left: 84px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('S PEC', document.getEle mentById('sel_s pecialty').valu e)" />
<input type="button" id="btn_a_by_sp ec" runat="server" value="Show A candidates" style="left: 84px; position: absolute; top: 105px; width: 169px; height: 24px;" onclick="return Excel_Export('A SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
<input type="button" id="btn_b_by_sp ec" runat="server" value="Show B candidates" style="left: 84px; position: absolute; top: 143px; width: 169px; height: 24px;" onclick="return Excel_Export('B SPEC', document.getEle mentById('sel_s pecialty').valu e)" />

</asp:Panel>

<asp:Panel ID="Panel2" runat="server" BorderStyle="Do uble" Height="185px" Style="left: 393px; position: absolute; top: 163px; z-index: 104;" Width="335px">
<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 2px; position: absolute; top: 8px; text-align: center;" Text="Pending Actions" Width="331px" />

<input type="button" id="btn_pss" runat="server" value="Pending PSS" style="left: 83px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('P SS', '')" />
<input type="button" id="btn_late" runat="server" value='Expired "Next Action"' style="left: 83px; position: absolute; top: 105px; text-align: center; width: 169px; height: 24px;" onclick="return Excel_Export('E NA', '')" />
</asp:Panel>

<iframe id="ifr_downloa d" style="visibili ty: hidden; width: 46px; height: 40px; position: absolute; top: 409px; left: 17px; z-index: 103;"></iframe>[/HTML]
May 26 '08 #1
3 9058
DrBunchman
979 Recognized Expert Contributor
I've not seen this particular problem before but it would probably be helpful to see the mark-up that this code generates. Take a look at the html source, find the appropriate part (your asp:Panel will have been turned into a div) and see what style settings it has.

Dr B
May 27 '08 #2
ShadowLocke
115 New Member
I've not seen this particular problem before but it would probably be helpful to see the mark-up that this code generates. Take a look at the html source, find the appropriate part (your asp:Panel will have been turned into a div) and see what style settings it has.

Dr B
It seemed to be correct..I even took at the ASP code and put the HTML div in myself.

this is what was being generated for each Panel:
[HTML]<div id="div1" style="left: 27px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 101; border-style: Double">
...
</div>[/HTML]

I stripped the page of javascript, and an include virtual which was my header and it still does it!
Heres the stripped page (also, i took out the panels and changed border-style to just border):

[HTML]<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="Repor ts.aspx.cs" Inherits="Repor ts" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Report s</title>
</head>
<body scroll="yes" bgcolor="#f3f8f f">
<form id="form1" runat="server">
<!--stripped javascript-->
<asp:Button ID="btn_back" runat="server" Height="27px" OnClick="btn_ba ck_Click" Style="z-index: 100; left: 207px; position: absolute; top: 46px" Text="Home" Width="78px" />

<div id="div1" style="left: 27px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 101; border: double">
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 3px; position: absolute; top: 8px; text-align: center;" Text="Candidate s by specialty" Width="330px" />

<select id="sel_special ty" runat="server" style="position : absolute; left: 62px; width: 212px; top: 33px;">
</select>

<input type="button" id="btn_special ty_report" runat="server" value="Show All" style="left: 84px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('S PEC', document.getEle mentById('sel_s pecialty').valu e)" />
<input type="button" id="btn_a_by_sp ec" runat="server" value="Show A candidates" style="left: 84px; position: absolute; top: 105px; width: 169px; height: 24px;" onclick="return Excel_Export('A SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
<input type="button" id="btn_b_by_sp ec" runat="server" value="Show B candidates" style="left: 84px; position: absolute; top: 143px; width: 169px; height: 24px;" onclick="return Excel_Export('B SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
</div>

<div id="div2" style="left: 393px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 104; border: double">
<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 2px; position: absolute; top: 8px; text-align: center;" Text="Pending Actions" Width="331px" />

<input type="button" id="btn_pss" runat="server" value="Pending PSS" style="left: 83px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('P SS', '')" />
<input type="button" id="btn_late" runat="server" value="Overdue response" style="left: 83px; position: absolute; top: 105px; text-align: center; width: 169px; height: 24px;" onclick="return Excel_Export('E NA', '')" />
</div>

<iframe id="ifr_downloa d" style="visibili ty: hidden; width: 46px; height: 40px; position: absolute; top: 409px; left: 17px; z-index: 103;">
</iframe>

</form>
</body>
</html>[/HTML]

I also stripped the code behind file down to nothing.

What I have done to fix this issue is put a second div inside of the first with border: double and it works good enough for me. But please, by all means have a crack at it. If you see whats wrong let me know!
May 28 '08 #3
jrusso1202
1 New Member
Here's how to fix this properly:


fieldset{
padding: 0.2em 0.5em;
border:1px solid green;
color:green;
font-size:90%;
text-align:right;
}


Put this code into your css file, or the css markup on the page.
Dec 11 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
8361
by: Lucas Tam | last post by:
Is there a divider control in VB.NET similar to a Horizontal Line in HTML? In the About Box of VS.NET, there is a divider line at the bottom of the page. -- Lucas Tam (REMOVEnntp@rogers.com) Please delete "REMOVE" from the e-mail address when replying. http://members.ebay.com/aboutme/coolspot18/
4
11701
by: Aaron Smith | last post by:
I have a panel that I have in the paint event to draw a Raised 3d border around it.. The problem is, if a msgbox is popped up or a tooltip is displayed, it leaves lines on the panel. I've tried invalidate after the msgbox to no avail... Here is the event: Private Sub Panel2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel2.Paint ControlPaint.DrawBorder3D(e.Graphics, e.ClipRectangle,...
4
6795
by: Sarika | last post by:
I migrated a VB6.0 application to VB.NET. This app has a drawing area, which is a panel. The user can drag and drop several objects on this drawing area and can also draw lines, boxes etc. The app is sufferring from the problem of flicker. On reading several posts on this forum and others I decided to enable double buffering for my panel. However the drawing area appears blank. I can briefly see the objects when adding new objects on the...
2
12958
by: Chris S. | last post by:
Here's a starter for 10 - I have the following simple code: private void panel1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawRectangle(new Pen(Color.Blue), this.panel1.ClientRectangle); } Where a panel is on a form. I've always had to alter the 'rect' variable as it doesn't draw the border correctly, the right and bottom
8
2200
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the same time, in the middle of my data entry , it is brining someelse data on my screen. I look everywhere i could not find the solution. Please help me Radx
6
3169
by: shumaker | last post by:
How do I make a panel control invisible, but still recieve events? I have a panel that I set visible= false, and over it I am using GDI+ to paint a grid of rectangles. It has to be invisble or else it covers up the GDI+. However, it is not firing the mousedown and up events while it is not visible. I am setting the visible property using VS through the properties window. I kind of anticipated that an invisble control would still...
6
6455
by: Paul_Madden | last post by:
I have a System.Windows.Forms.Form onto which I add a Panel (MyPanel) directly derived from System.Windows.Forms.Panel. Here are the important code fragments ... public class MyPanel : Panel { ............................. public MyPanel () : base ()
3
2435
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a couple of the Firefox is munging up. So, on my information page there is a gridview in the content section of the page. The masterpage contains searching capabilities for the gridview. The masterpage has controls contained in a panel control,...
4
8425
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even onactivetabindexchanged we have called a method loadtabpanel() which is defined in javascript in same page.the problem is it sometime give the message load tab panel undefined. this error does not come regularly. it comes in usercontrol rendering . i...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.