Can't get postback to update controls

Nov 19, 2010 at 5:04 PM

I place your Flajaxian FileUploader and a label to be updated after postback.

I upload a file and the postback is triggered, the label is updated on the server but it is not refreshed on the client.

My test markup as follows:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="testFlajactianFileUploader.WebForm1" %>
<%@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.FileUploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
    <fjx:FileUploader ID="FileUploader1" RequestAsPostBack="true" runat="server">
                <fjx:FileSaverAdapter Runat="server" FolderName="~/tmp/Uploaded" />

    <br />

    <asp:Label ID="Label1" runat="server" Text="before postback"></asp:Label>


my code behind:

Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack Then
            Label1.Text = "after postback"
        End If
    End Sub

End Class

Dec 9, 2010 at 4:43 PM

I have the same issue. Any luck?

Dec 9, 2010 at 4:55 PM

Hey people this is ajax control. What post back? What are you talking about?

Dec 9, 2010 at 5:28 PM

the uploader has RequestAsPostBack property.

Dec 9, 2010 at 6:27 PM

Request is always on a background thread whether it is Post Back or just XML. If you want a normal post back why use this control? Use the Microsoft FileUpload control.

If you want to refresh when the upload is over use client side code:

Dec 9, 2010 at 6:31 PM

Good answer, thanks!