0

I am using the JSON object with jquery in asp.net application. The code is working with VS2008 but when i moved sam code in VS2003 then it is showing the JSON is undefined. Code is following

var mes = $('#filePath').val();
alert("File Path: " + mes);
var jsonText = JSON.stringify({ sFilePath: mes });

In third line it is giving the error : Microsoft JScript runtime error: 'JSON' is undefined

Can any one help on this. Do i need to add any reference.

Thanks in Advance Eshwer N

1 Answer 1

3

This does not smell like an ASP.NET issue. Rather try including the json2.js as part of your script tags -

http://www.json.org/

https://github.com/douglascrockford/JSON-js

http://www.json.org/js.html

<script src="/api/flow.js?q=http%3A%2F%2Fwherever.com%2Fjson2.min.js" type="text/javascript"></script>
Sign up to request clarification or add additional context in comments.

1 Comment

hi Kris, thanks for reply. i used this step but still same error... any other suggetions!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.