MVC Controller Action Gets Called Multiple Times

154 Points
67 Posts


I am working with MVC 5. I am facing strange problem where a controller action is called at least twice some time more than. Also I have tried by direct accessing through typing in browser but same problem occurred.

What will be the problem?

Thanks in advance.

Views: 17071
Total Answered: 2
Total Marked As Answer: 0
Posted On: 23-Jan-2016 05:52

Share:   fb twitter linkedin
Rahul Maurya
Rahul M...
1402 Points
236 Posts

Some time Controller Action Gets Called Multiple Times for following reason:

  • if view or layout page has img tag with src="#" 
  • if view or layout page has anchor tab with href="#"

In above both case an action get called multiple times. You have to remove the tag or put src or href or blank it.

Posted On: 28-Jan-2016 02:44
294 Points
82 Posts

I also faced same issue. The Action was rendering multiple times. The only problem was with

<img id="image1id" src="#" alt="your image" />

Don't know for what reason src attribute of image was causing to perform rendering multiple times on page. I just changed it to ""`

<img id="image1id" src="" alt="your image" />

and it is working fine now.

Posted On: 28-May-2018 00:43
 Log In to Chat