2012年3月24日土曜日

rounded corners - how hard can it be?

I thought I'd use the AJAX toolkit just to add some nice round corners to a panel. How hard can that be? I'm only using it because it looks so damn easy. Only it won't work - no friggin corners. I got so frustrated, I copied the code directly from the sample website and pasted it onto my page. Still doesn't work! Here's the HTML:

 <ajaxToolkit:RoundedCornersExtender ID="rce" runat="server" TargetControlID="ContentPanel" BehaviorID="RoundedCornersBehavior1" Radius="6" Color="255, 224, 192" /> <asp:Panel runat="server" ID="ContentPanel" Width="350px" Height="400px" CssClass="newscontent"> <h2>Click a news item to view</h2> </asp:Panel>
Nothing. Anyone had this? I should mention perhaps it's in a master page context. I really can't imagine what else could be a factor. I even tried implementing it from the design view - which I hardly ever use - and everything looked hunky dory. Adding the color line gives me a rounded corner top edge in that color. The rest is white.

I think that the problem is withnewscontent css style. Can you post it here?


kipo:

I think that the problem is withnewscontent css style. Can you post it here?

I thought of that too. Alas, the only thing left in the CSS is this:

.newscontent {float:right; margin-left:5px;}

Crazy huh? So far I have to say I have had lots of problems with these wonderful-looking controls.


OK, here is working example:http://rapidshare.com/files/54867245/RoundedCorners.zip.html
Download it and try to run on your machine. If it works ok than there is something wrong in your code (most likely in web.config file), but if it doesn't work than I suppose you will need to reinstall AJAX.

0 件のコメント:

コメントを投稿