The properties for the Img1 element do not have the additional RoundedCornersExtender properties.

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I added a RoundedCornersExtender to my page.
Then swithed to DEsign view and in the properties set the TargetControlID.
Once I did that the line for the TargetControlID disappeared in the
properties.
But when I look at the properties for the Img1 element I do not see the
additional RoundedCornersExtender properties.
Below is some of the pages markup.

If I runn I get the error:
Line: 209
Error: Unexpected call to method or property access.

Do you see what is wrong?

Thanks

...snip
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>

<%@ MasterType VirtualPath="~/Main.master" %>

<asp:Content id="Content3" ContentPlaceHolderid="LeftCPH" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server"

TargetControlID="Img1">

</cc1:RoundedCornersExtender>


<img id="Img1" style='border:0px;' runat="server"
src="../Images/Massabki.gif" alt="Masswabki" />


</asp:Content>

...snip
 
I added a RoundedCornersExtender to my page.
Then swithed to DEsign view and in the properties set the TargetControlID..
Once I did that the line for the TargetControlID disappeared in the
properties.
But when I look at the properties for the Img1 element I do not see the
additional RoundedCornersExtender  properties.
Below is some of the pages markup.

If I runn I get the error:
Line: 209
Error: Unexpected call to method or property access.

Do you see what is wrong?

Thanks

..snip
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>

<%@ MasterType VirtualPath="~/Main.master" %>

<asp:Content id="Content3" ContentPlaceHolderid="LeftCPH" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server"

TargetControlID="Img1">

</cc1:RoundedCornersExtender>

<img id="Img1" style='border:0px;' runat="server"
src="../Images/Massabki.gif" alt="Masswabki" />

</asp:Content>

..snip

I don't think it works with images. It is strange but I don't see any
clear explanation on this on ASP.NET site.

Quote: "TargetControlID - The ID of the button or link for this
extender to operate on" (what button?)
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/RoundedCorners/RoundedCorners.aspx

Quote: "This extender control typically attaches to a Panel control."
http://msdn.microsoft.com/en-us/library/bb470384.aspx

So, I would try with panel and if it works, do a panel to wrap the
textbox...

Hope this helps
 
Alexey said:
I don't think it works with images. It is strange but I don't see any
clear explanation on this on ASP.NET site.

Quote: "TargetControlID - The ID of the button or link for this
extender to operate on" (what button?)
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/RoundedCorners/RoundedCorners.aspx

Quote: "This extender control typically attaches to a Panel control."
http://msdn.microsoft.com/en-us/library/bb470384.aspx

So, I would try with panel and if it works, do a panel to wrap the
textbox...

Hope this helps

Thanks,
I did try with a div and it worked OK.
 
Back
Top