learning
learning

Reputation: 11735

how to include a namespace in MVC view

I am trying to include<% @using System.Web.Script.Serialization%> but it is giving me error message: The server block is not well formed.

Upvotes: 0

Views: 415

Answers (1)

McGarnagle
McGarnagle

Reputation: 102793

If you're using Razor syntax, it's like this:

@using System.Web.Script.Serialization

ASP.net syntax is like this:

<%@ Import Namespace="System.Web.Script.Serialization" %>

Upvotes: 4

Related Questions