TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
31
22.8k
How to read values in ASP from jQuery
May 9 2017 9:07 AM
$(
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.
Reply
Answers (
2
)
jquery not loading in asp.net mvc
Read values sent to ASP page from jQuery get/post/ajax in c#