On referring to this post ASP.net Uploadify Querystring checkbox value, I simply tried to pass the value of a textbox control to FileUploads.aspx.cs but I am unable to get the value, neither using with POST method nor with GET.
<p>
<asp:TextBox ID="tbTrainingName" runat="server" CssClass="TextBox"></asp:TextBox>
</p>
<div id="fuFiles"></div>
$(document).ready(function () {
$('#fuFiles').uploadify({
// Some options
'method' : 'GET',
'uploader': '_scripts/uploadify.swf',
'script': 'FileUploads.aspx?trainingName=' + ('[id$=tbTrainingName]').val() '',
'cancelImg': '_scripts/cancel.png',
'auto': 'true',
'multi': 'true',
'buttonText': 'Upload Files...',
'queueSizeLimit': 3,
'simUploadLimit': 2
});
});
In FileUploads.aspx.cs
HttpPostedFile uploads = Request.Files["FileData"];
string file = System.IO.Path.GetFileName(uploads.FileName);
I am unable to see any thing in Request.QueryString. Could you help me where I am wrong!! Also if you have any good suggession other than uploadify, please suggest, I am using asp.net 4.0.