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

Home Posts Topics Members FAQ

Rounded corner panel

34 New Member
Please tell me how to get a panel with rounded corner..

I am using below code for that,but i am not getting the panel with rounded corners.If the value of Radius is increased only the Width of panel increases.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Panel titlePanel = new Panel();
  3.  
  4. AjaxControlToolkit.RoundedCornersExtender roundPanel = new AjaxControlToolkit.RoundedCornersExtender();
  5. roundPanel.ID = "roundPanel";
  6. roundPanel.TargetControlID = titlePanel.ID; 
  7. roundPanel.Radius = 5;
  8. pnlGetInfoTool.Controls.Add(roundPanel);
  9.  
  10.  
Regards,
Manjit
Nov 7 '08 #1
2 2145
Frinavale
9,735 Recognized Expert Moderator Expert
You need to declare your control as a global member to your aspx page and you need to instantiate it in your Page Init event.

The following works for me:

Expand|Select|Wrap|Line Numbers
  1.    Private testLabel As Label
  2.     Private testPanel As Panel
  3.     Private testRoundedCorners As AjaxControlToolkit.RoundedCornersExtender
  4.  
  5. Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
  6.  
  7.         testLabel = New Label
  8.         testLabel.Text = "Hello World!"
  9.         testPanel = New Panel
  10.         testPanel.ID = "testPanel"
  11.         testPanel.Controls.Add(testLabel)
  12.         testRoundedCorners = New AjaxControlToolkit.RoundedCornersExtender
  13.         testRoundedCorners.ID = "testingCorners"
  14.         testRoundedCorners.TargetControlID = "testPanel"
  15.         testRoundedCorners.Color = Drawing.Color.DarkGreen
  16.  
  17. 'TestSectionPanel exists on the page already
  18.         TestSectionPanel.Controls.Add(testPanel)
  19.         TestSectionPanel.Controls.Add(testRoundedCorners)
  20.     End Sub
  21.  
-Frinny
Nov 7 '08 #2
manjitsarma
34 New Member
Thank you very much for your reply.

Regards,
Manjit
Nov 10 '08 #3

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

Similar topics

4
3644
by: Dan V. | last post by:
What is the best way to have a background image stretch and have the 'left rounded corner' look. Please see the top header at this website for an example: www.kingtree.ca and http://www.officeactivate.com What I have works, but fails in Dreamweaver 2004 validation of CSS. I would like it to be valid CSS. This is the 'bad' code: (but works in IE6 and FireFox 1.x / Mozilla) <table width="100%" border="0" cellpadding="0"...
2
7875
by: Dino Buljubasic | last post by:
Hi, I have several panels that holds bunch of controls with information on my forms. My form has background image property set to an image that has borders defining where my panel comes and that border is rounded so when I set my panels border stile to none, the panel appear to have the rounded border (that comes from the forms background image. This looks really nice, but the problem is that my forms can not be resizable then, since...
1
1607
by: serge calderara | last post by:
Dear all Any idea to how to make a panel with rounded corner ? regards serge
1
2650
by: Stephen Takacs | last post by:
I've been reading lots of rounded corners table tutorials lately, because I'm a Perl guru, not an HTML guru. :-) So far all of the examples I've seen have edges with narrow angles, which fit easily into a single corner cell. Simple stuff. Piece of cake. By now I can do them in my sleep while juggling hippopotamuses and hanging upside down. But this one is different. In this particular case, it takes three corner edges to hold each...
8
2429
by: TheCornjerker | last post by:
I've been looking into what method I should use to show rounded corners (and I've found a lot). My question is why does Google seems to mostly use the table method with an image in each corner. Granted they do use a transparent gif so they don't need multiple colored gifs, but I thought most developers shun the table rounded corner method. Any thoughts why? Is it easier to maintain or have a higher browser support? Thanks.
3
2012
by: laredotornado | last post by:
Hi, I was recently exploring JQuery and the rounded corner plugin -http:// methvin.com/jquery/jq-corner-demo.html, unfortunately, this plug-in seems to only apply to rounding corners in the background. I would like to have a rounded corner border in which the border color is black and the background for the rest of the DIV is white. Do you know of a JQuery plug-in that does this? Short of that, what is my next best JS option?
5
2471
by: Stuart Ferguson | last post by:
I am looking to create the effect shown in the image (http://img291.imageshack.us/img291/4476/effectuc6.jpg) this is taken from www.asp.net. I was wondering if there is a specific technique to creating this rounded corner effect (e.g. a css class or server side ASP.Net component) or is this as simple as creating a gradient image with rounded corners and reusing throughout the site. Many Thanks Stuart
1
2580
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could not use the "standard" rounded corner method of sliced images for the corners (since that would only allow a certain color to match) I tried using a corner-rounding js tool from http://openrico.org, but it failed miserably (in both IE and Opera) ...
2
1834
by: raknin | last post by:
Hi, I am looking for a css and js solution for making rounded corners, with no images. Currently I tried to use nify corners as describe in http://www.html.it/articoli/nifty/index.html in example 4, a problem occure when I try to use it in a table. What happen is that a multi windows opens overlapping one over the other in one cell and in the other cell the script was not activated at all, no rounded corners (IE7). What I want to get is that...
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
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
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...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
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();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.