Strange Behavior

    Date: 02/08/06 (C Sharp)    Keywords: web

    I have a WebPart written in C#. There are buttons on the main screen, which take me to other views. The Buttons on the main View fire off the correct events, however the buttons on other views do not.



    public void CreateViewState
    {
    ...
    Button addRFI = new Button();
    addRFI.Text="Add New RFI";
    addRFI.Click += new EventHandler(addRFI_Click);
    ...
    }
    public void CreateAddState
    {
    ...
    Button submitRFI = new Button();
    submitRFI.Text = "Submit";
    submitRFI.Click += new EventHandler(submitRFI_Click)
    ...
    }
    protected void addRFI_Click(object sender, EventArgs e)
    {
    this.CurrentState = RFIState.AddSate;
    }
    protected void submitRFI_Click(object sender, EventArgs e)
    {
    // Process RFI ADD HERE
    }

    OK, So I set a break point in each of the Click Routines, Load up My SharepOint with the WebPart. Click on Add RFI, and the program breaks on the BreakPoint in addRFI_Click, loads the Form with the Submit button on it. Press the Submit Button, and the program breaks at the break point in the addRFI_Click event , NOT the event it is tied too.

    What in the world is going on here???

    Source: http://community.livejournal.com/csharp/49283.html

« Object behind bindingsource... || Refresh a dataset? »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home