Click here to Skip to main content
14,384,323 members
Rate this:
Please Sign up or sign in to vote.
See more:
i use ajax to insert data into tables but whenn i click on save button it give me an error that says
http://localhost:49895/Home/Create 500 (Internal Server Error)
send @ jquery-1.8.3.min.js:2
ajax @ jquery-1.8.3.min.js:2
(anonymous) @ Create:542
dispatch @ jquery-1.8.3.min.js:2
u @ jquery-1.8.3.min.js:2

What I have tried:

i have tried inetmgr to mange this issue but failed
Posted
Comments
Richard MacCutchan 7-Nov-19 6:07am
   
You need to inspect the server logs. There is no way anyone here can guess what is happening to cause that.
F-ES Sitecore 7-Nov-19 6:16am
   
It's the code at the target url ("Create") that is throwing the error. You need to debug\log the code that executes on that action to find out what the problem is.
Member 14552976 7-Nov-19 6:28am
   
i have used debugger but it give undefined value of textbox
Richard MacCutchan 7-Nov-19 6:44am
   
Well that is a good clue; something that you are passing through the connection is not valid.
Afzaal Ahmad Zeeshan 7-Nov-19 7:33am
   
That problem is with the server-side code, your jQuery is fine.

Add a breakpoint on the Create function and debug it.
Dave Kreskowiak 7-Nov-19 8:11am
   
No, that does NOT mean the jquery is fine.

The call is being made, but is the data being sent what the server expects? Maybe not.

But, the server-side code may not be doing any validation on what's being presented to the method and making assumptions that turn out to not be true. The server-side code can fail if it uses bad or missing data.

In any case, 500-class errors just mean the server-side code failed for some reason. They don't mean the client-side code was good.
ZurdoDev 8-Nov-19 15:42pm
   
What do you think we can do about it?

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100