Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Accessing form variables with AjaxControlToolkit's AjaxFileUploader

$
0
0

Hi,

I am trying to use AjaxFileUploader to upload files. The file upload works fine.

But, I would like to access a form variable as part of AjaxFileUploader's OnUploadCompleteAll function (server side) but its not available in

codebehind for some reason. This function is called on the click of Upload button when all the uploads are complete.

<asp:TextBox ID="_branchTxtBox" runat="server" MaxLength="3"></asp:TextBox><asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll"/>

In the codebehind, I have

protected void AjaxFileUpload1_UploadCompleteAll(object sender, AjaxFileUploadCompleteAllEventArgs e)
 {

    string branchNumber = _branchTxtBox.Text.ToString(); // empty
 }

Any thoughts why the branchNumber is empty in codebehind?

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>