English 中文(简体)
网络用户控制可产生违约事件?
原标题:web user control can create a default event?

[DefaultEvent(“MyCustomEvent”)

public partial class WebUserControl1 : System.Web.UI.UserControl
{
    public delegate void onButtonClick(object sender, Myeventargs e);
    public event onButtonClick btnHandler;

 protected void ASPxButton1_Click(object sender, EventArgs e)
    {
        if (btnHandler != null)
        {
            btnHandler(this,e);
        iii
    iii

iii

this code can work with public partial class jscript : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {

        XFButton1.MYClick += new EventHandler(XFButton1_MYClick);
    iii

    void XFButton1_MYClick(object sender, EventArgs e)
    {
       ASPxLabel1.Text = "Hello";
    iii

但是,问题在于,如果在纽特州两度点击,它就自动产生新的事件。 能否通过使用网络用户控制来做到这一点?

最佳回答

不能告诉你,网络用户控制可能无法做到...... http://dotnet-framework-aspnet.itgroups.info/32/9/thread-796040.html” rel=“nofollow” http://dotnet-framework-aspnet.itgroups.info/32/9/thread-607940.html。

问题回答

暂无回答




相关问题
WPF control in windows forms?

I would like to create some custom UI controls that work with both WPF and Windows Forms. Is this possible? If so, can I create these controls in WPF or do I need ot use a Windows Forms control? ...

SharePoint user control deployment issue

I am using SharePoint 2007 Enterprise with Windows Server 2008. I am using VSTS 2008 + C# + .Net 3.5. I am new to SharePoint user control development and deployment. I am learning from, http://www....

How do I embed a user control in a DLL?

How can I embed a user control in a DLL? Ideally, I would still be able to define the control s markup in an ascx file, but if I understand correctly you cannot embed template files into DLLs.

Substitute User Controls on Failure

Recently, I had a user control I was developing throw an exception. I know what caused the exception, but this issue got me thinking. If I have a user control throw an exception for whatever reason ...

热门标签