onconfirmupload event not working

Oct 4, 2009 at 10:43 PM

I have a base webpage with the following aspx code and vb.net code behind and I can not get the onconfirmuplaod event to work any ideas why?  The file does upload but no confirmation


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="amazonUpload.aspx.vb" Inherits="amazonUpload" %>
<%@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.FileUploader" %>
<%@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.DirectAmazonUploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

    <form id="form1" runat="server">
    <fjx:FileUploader ID="FileUploader1" runat="server">
        <fjx:DirectAmazonUploader OnConfirmUpload="FileUploader1_ConfirmUpload"
            BucketName="origotree"  />
        <br />
        <br />
        <asp:Literal ID="Literal1" runat="server"></asp:Literal>


VB.net Code:

Partial Class amazonUpload
    Inherits System.Web.UI.Page
    Private Sub FileUploader1_ConfirmUpload(ByVal sender As Object, ByVal e As com.flajaxian.ConfirmUploadEventArgs)
        Literal1.Text = "confirmed"
    End Sub

End Class

Oct 5, 2009 at 3:29 AM

Well you can't expect an event on an ajax request to affect your main request unless you write some javascript.

I would recommend you google for some basic ajax tutorials in order to understand what is ajax and how it works. Even better would be to install Fiddler and to observe different request so to understand what is happening in each request.

For client side changes and how to update UI without refreshing the page refer to http://flajaxian.com/flajaxian.com/DirectAmazonUploader1.0Help.html#ConfirmUploadClientSide