Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:56:53+00:00 2026-06-15T08:56:53+00:00

I am trying to call a Json.Encode(…) method in MVC 4 and I’m getting

  • 0

I am trying to call a Json.Encode(...) method in MVC 4 and I’m getting an error: The name 'Json' does not exist in the current context.

I’ve tried adding System.Runtime.Serialization namespace, which has Json class, but this particular instance of Json class doesn’t have Encode method.

What assembly am I missing here?

Here is my exact code:

{ url: '@Url.Action("DeleteDefinitionRule")', editData: 
    { companyCode: 'LO', definitionID:@Html.Raw(Json.Encode(Model.DefinitionID)) } }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:57:02+00:00Added an answer on June 15, 2026 at 8:57 am
    1. References in solutions explorer > right click > Add reference
    2. Under Assemblies > Framework, search for “System.Web.Helpers” Double click
    3. System.Web.Helpers version 2.0.0.0 and click ok. Find the
    4. System.Web.Helpers you’ve just added > right click it > properties.
    5. Change “Copy Local” from false, to true

    And now @Json.Encode should work.

    Update

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
I'm trying to return a JSON response from a Django view call via an
I am trying to use to a PUT call to a API using JSON.
I'm trying to get a JSON from a webservice with javascript $.Ajax call. <script
I am trying to make a call to api which returns json object {
Im trying to call a method that will add or subtract 1 from a
I'm trying to call a Feed Form in my Facebook application and I'm not
I'm trying to make a JSON call library. It has the following features. be
I'm trying to display the REST call JSON response in jQuery datatables . Below
I'm trying to execute this JSON call as follows: button.setOnClickListener(new OnClickListener() { @Override public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.