Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to read values in ASP from jQuery
Mohith Kovela
May 9 2017 9:07 AM
213
Reply
$(
function
() {
$(
"#button"
).click(
function
() {
alert(
"You clicked Submit button"
);
$.ajax({
type:
"POST"
,
url:
"Insert.aspx"
,
data:
"{'StudentId': 'B1111' ,'StudentName': 'Likhit'}"
});
$(
"#studenttable"
).append(
"<tr><td>B1111</td><td>Likhit</td></tr>"
);
});
Above is my jQuery function.
sid = Request.QueryString[
"StudentId"
].ToString();
This is how I am trying to retrieve data from function. But it's not working.
"
An exception of type 'System.NullReferenceException' occurred in App_Web_kqkv5dqo.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
"
Help me with suggestions.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
jquery not loading in asp.net mvc
Read values sent to ASP page from jQuery get/post/ajax in c#