2

I have created a partial view "_Test1" in mvc 4.0.

enter image description here

With the help of a controller I am calling my partial view.

private ActionResult MyView()
{
    return PartialView("_Test1");
}

When I debug I don't get any error, I assume that my partial view has been loaded successfully through controller. Now with the help of this partial view, I have to call a javascript. Which gives me an error "Unexpected character '$'". Please refer he screenshot below :-

enter image description here

Can someone help ?

3
  • 1
    $ is for jquery I pressumed. Please add the jquery library in your main view Commented Aug 5, 2016 at 5:47
  • This may help you, stackoverflow.com/questions/885990/… Commented Aug 5, 2016 at 5:54
  • Thanks Smit for sharing me the link.. It worked.. Commented Aug 5, 2016 at 6:48

0

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.