Created
July 18, 2016 21:41
-
-
Save sh0umik/06148d6314a41873f1b54277df25c6d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTML Part | |
` | |
<form> | |
<input type="post" method="server.asp" > | |
<input type="submit" value="Submit"> | |
</form> | |
` | |
# Server Part | |
# Get the data from the POST in server.asp | |
` | |
string[] keys = Request.Form.AllKeys; | |
for (int i= 0; i < keys.Length; i++) | |
{ | |
Response.Write(keys[i] + ": " + Request.Form[keys[i]] + "<br>"); | |
} | |
` | |
# Then Process your logic in server.asp and create strings or array then write the response as JSON | |
` | |
var json = Json.Encode(new { | |
name = data["val1"], | |
something = data["val2"] as bool?, | |
class = data["val3"] as DateTime? | |
}); | |
Response.Write(json); | |
` | |
# Grab the JSON Response from server using JQuery | |
use jQuery Json Serializer to output that json to HTML file .... | |
#austProgrammingSolve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment