views:

168

answers:

0

I saw another post like this: http://stackoverflow.com/questions/1795621/asyncpostbacktrigger-disables-buttons But I don't really know what to make of it. The accepted answer was poorly typed.

Basically, I have a button with an OnClick function. I also have a UpdatePanel, with is AsyncPostBackTrigger set to that same button.

It seems that if I do this, my Button no longer does ANYTHING.

I guess it's because I have a Page_Load() event... Can anyone explain why this is? And how should I set up my webpage if I can't use the Page_Load() function?

Oh and if I put my Button in a UpdatePanel, it also won't do anything, probably because of the same reason.

This is a section of my code:

<asp:FileUpload id="FileUploadControl" runat="server" />
<asp:Button runat="server" id="UploadButton" text="Upload" OnClick="uploadClicked" />
<br /><br />
<asp:Label runat="server" id="StatusLabel" text="Upload status: " />
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" updatemode="Conditional" >
        <ContentTemplate> 
            <asp:DropDownList ID="songList" runat="server" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="UploadButton" />
        </Triggers>    
</asp:UpdatePanel>

Thanks in advance.