Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<form action="http://127.0.0.1:8085" method="get" >
       <label>First Name</label>
       <input type="text" name="firstName" ></br>
       <label>Last Name</label>
       <input type="text" name="lastName" ></br>
       <label>Email Address</label>
       <input type="text" name="emailAddress"></br>
       <label>Password</label>
       <input type="text" name="password"></br>
       <input type="submit" >

   </form >

i am getting this in url
http://127.0.0.1:8085/?firstName=&lastName=&emailAddress=&password=[^]

but how to get value??? firstName=???
Posted

Here you can use Identifier (id) to each input element. Like as below:-
C#
<form>
    <lable>First Name
    <input type="text" name="firstName" id="formSUbmitFirstName" />
    <label>Last Name</label>
    <input> type="text" name="lastName" id="formSubmitLastName"/>
    ....// goes on like this..
</input></lable></form>

And while retreiving values, write
C#
var firstNameForPost = $("#id").val();
 
Share this answer
 
 
Share this answer
 

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



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