Click here to Skip to main content
14,828,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
unable to get form data on server side

here is my form tag
HTML
<form id="JqAjaxForm" enctype="multipart/form-data" >
<input accept="doc/docx" type="file"  önchange="CopyMe(this, 'textfield');" style="display:none" id="tt" size="40" />
<br /><br />
<input
id="Text1"
type="text" />
<input id="btnsubmit" type="submit" value="SUBMIT" />
</form>

here is the script to submit form through ajax jquery
JavaScript
<script type="text/javascript">

$(function(){
$("#JqAjaxForm").submit(function(e){
e.preventDefault();

dataString = $("#tt").serialize();
alert(dataString)

$.ajax({
type: "POST",
url: "senddoc.aspx",
data: dataString,
dataType: "json",
success: function(data) {

if(data.email_check == "invalid"){
$("#message_ajax").html("<div class="errorMessage">Sorry " + data.name + ", " + data.email + " is NOT a valid e-mail address. Try again.</div>");
} else {
$("#message_ajax").html("<div class="successMessage">" + data.email + " is a valid e-mail address. Thank you, " + data.name + ".</div>");
}

}

});

});
});

</script>

at code behind if i use Request.Files("tt1")
it shows nothing

pls suggest
Posted
Updated 10-Jun-12 3:00am
v3
Comments
Nathan Stiles 4-Jul-12 2:43am
   
Request.Form ??
Is it actually posting data? Did you check the network request in the browser?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900