Hi, I have tried this code:
<%@dotnet.itags.org. Page Language="C#" %>
<SCRIPT runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Image i = new Image();
Panel pl = new Panel();
PlaceHolder1.Controls.Add(pl);
pl.Controls.Add(i); pl.BorderColor = System.Drawing.Color.Blue;
pl.BackColor = System.Drawing.Color.Blue;
pl.ID = "pnl";
i.ID = "pppp";
i.ImageUrl = "../images/1/1.jpg";
i.Height = 200;
i.Width = 200;
pl.Height = 200;
pl.Width = 200;
AjaxControlToolkit.RoundedCornersExtender rce = new AjaxControlToolkit.RoundedCornersExtender();
PlaceHolder1.Controls.Add(rce);
rce.ID = "bleble";
rce.TargetControlID = pl.ID;
rce.Radius = 6;
}
</SCRIPT>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD id=Head1 runat="server">
</head>
<body>
<FORM id=form1 runat="server">
<DIV>
<?xml:namespace prefix = asp /><asp:ScriptManager id=ScriptManager1 runat="server">
</asp:ScriptManager>
<asp:PlaceHolder id=PlaceHolder1 runat="server"></asp:PlaceHolder>
</DIV>
</FORM>
</body>
</html>
For some reasons the result I got is the image inside a panel, with two blue thin rounded corners rectangles on the top of the image and on the bottom of it.
It didn't make rounded corner image. What is the problem of it? How can I display rounded corners image?
Why dont you try to create the conrol in the front end instead of the code behind.
use the following code that is on the sample and see it works fine. All you have to do is give the Id of the control!
http://www.asp.net/ajax/control-toolkit/live/RoundedCorners/RoundedCorners.aspx
I write my application in a way that for each aspx file there is aspx.cs file. I tried this 100 times and it didn't worked for me. Take the code I wrote and try it yourself. Does it show a rounded corner Image? For some reason, Images are not working for RoundedCornersExtender.
I am looking desperatly for an answer.
0 件のコメント:
コメントを投稿