html form is not posting input control values on postback -
i have simple html page 1 form , few controls in it. html page hosted on server. when post form values in input fields not show input values in form post data.
reuest body has btn1=post other controls not listed there
below html :
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test</title> </head> <body> <form id="form4" action="somepage.htm" method="post" > <input type="text" id="textmain1" value="" /> <input type="text" id="textmain2" value=""/> <input type="text" id="textmain3" value=""/> <input type="submit" id="btn1" name="btn1" /> </form> </body> </html>![enter image description here][2]
these things have tried: -adding name , id attribute input control -adding runat=server in case (html page written in vs ide) -add enctype="multipart/form-data" form -run in chrome browser
may link defined want , useful you
$("#form4").submit(function(event) { /* stop form submitting */ event.preventdefault(); /* values elements on page: */ var values = $(this).serialize(); /* send data using post , put results in div */ $.ajax({ url: "test.php", type: "post", data: values, success: function(){ }, }); });
Comments
Post a Comment