Not able to invoke jquey Ajax method for fileupload input value

Posted by Santosh.Impossible under jQuery on 4/25/2012 | Points: 10 | Views : 1222 | Status : [Member] | Replies : 0
I am trying to invoke the serverside method from the jquery. It is working fine in FireFox but not in IE8 and IE9.

Please find the below code sample :
<asp:FileUpload ID="flAppIcon" runat="server" onchange="GetFileSize();"/>
<asp:HiddenField ID="_hdnAppIcon" runat="server" Value="0" />

<script type="text/javascript" language="javascript">
function GetFileSize() {
var PageURL = '<%= ResolveUrl("~/WebForm16.aspx") %>'
var test = ($('#<%=flAppIcon.ClientID%>').val()).toString();
type: "POST",
url: PageURL + '/GetFileSizeDetails',
data: '{file: "' + $("#<%=_hdnAppIcon.ClientID%>")[0].value + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
function OnSuccess(response) {
public static string GetFileSizeDetails(string file)
return "100";
Can anyone help me to know the root cause of this issue.

Thanks & Regards,
Santosh Kumar Patro

santosh kumar patro


(No response found.)

Login to post response