Cannot find JavaScriptSerializer or System.Web.Script.Serialization

← PrevNext →

if you cannot find JavaScriptSerializer or System.Web.Script.Serialization in your .Net 4 project, then follow these simple steps.

You'll have to reference System.Web.Extensions in your .Net 4 project.

1) Open project explorer and click the project. Click "Add Reference".

add reference in asp.net

2) It will open the "Add Refence" window. Click ".NET" tab and find "System.Web.Extensions" and select it. Click the OK button.

add system.web.extensions in .net project

3) Now, you should be able to "import" the below namespace.

import

You can now "serialize and deserialize" JSON by creating JavaScriptSerializer object in your .Net projects.

See this tutorial... How to read JSON file and Convert data into an HTML table in Asp.Net MVC using C# and VB, using "JavaScriptSerializer" class.

Happy coding. 🙂

← PreviousNext →