htmlfile:对方法或属性访问的意外调用 [英] htmlfile: Unexpected call to method or property access

查看:68
本文介绍了htmlfile:对方法或属性访问的意外调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试使用AjaxControlToolkit的RoundedCornerExtender在ASP.NET网站中使用圆角"按钮.当我在Buton控件上使用此控件时,出现一条错误消息:"htmlfile:对方法或属性访问的意外调用",可以对其进行中断/继续.
当我运行这些站点时,它给我一个错误意外调用Mathod或访问属性".以下是屏幕截图:

Hi,
I am trying to use Rounded Corner buttons in my ASP.NET website using AjaxControlToolkit''s RoundedCornerExtender. When I use this on a Buton control, I get an error saying "htmlfile: Unexpected call to method or property access" to which I can Break/continue.
When I run the sites, it gives me an error "Unexpected call to mathod or property access".Here''s the screenshot: http://img29.imageshack.us/img29/7051/roundedcornersp.png[^]

推荐答案

您可以在
You could set CSS properties on the standard button class[^] (using the Style property for inline css (IIRC) or the Attributes property for setting the class). You could also create a class inheriting from Button and override the Render method, you can then consume the Click event as you would with a standard Button.

For more customisation, you could create your own custom Button class that inherits from WebControl and override its Render method:

public class RoundedButton : System.Web.UI.WebControls.WebControl
{
    protected override void Render(System.Web.UI.HtmlTextWriter writer)
    {
        // render custom html here using the HtmlTextWriter
    }
}



检查
[ HtmlButton [



Check this[^] out for information about developing custom server controls.

There is also a HtmlButton[^] class which you could use in a similar fashion.


这篇关于htmlfile:对方法或属性访问的意外调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆