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 122699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:10:12+00:00 2026-05-11T04:10:12+00:00

I might have wandered into wrong direction so please help. I have a page

  • 0

I might have wandered into wrong direction so please help.

I have a page in my ASP.NET MVC application which displays comments. These comments come from ‘Index’ action of ‘Comments’ controller. At the bottom of the page I have a form for adding new comments. This form should call

[AcceptVerbs(HttpVerbs.Get)]  public ActionResult AddComment(); 

action when rendering the form to user and

[AcceptVerbs(HttpVerbs.Post)]  public ActionResult AddComment(Comment c);  

action when posting new comment to server.

I presume that ‘Comments’ page should call three action methods (Index, AddComment[Get], AddComment[Post]). However AddComment[Get] is never called.

Please point me to right direction.

Thank you.

  • 1 1 Answer
  • 2 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. 2026-05-11T04:10:12+00:00Added an answer on May 11, 2026 at 4:10 am

    If the form submit does a POST (submit) to the comments page (i.e. has the action of the comments page, and the method of POST), then it is indeed the POST version that chouls be used. The GET version would be used if you (for example) use a standard anchor/link to show the standalone comments page (or when issuing an AJAX ‘get’ to that address).

    How are you currently hitting the pages? At the moment it sounds like your index page is adding the form manually – so there is no place for the comments GET to be used, unless you are adding the form via AJAX.

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

Sidebar

Related Questions

I wondered if someone might have some insight into this. jqGrid is quite happy
I might have pretty basic question about regex. I have the following regex, which
I might have a problem with my application. There is a client running multiple
You might have a set of properties that is used on the developer machine,
You might have seen video through you tube in iPhone. Normal MPMoviePlayerController has previous,
I have a situation where I might have multiple instances of a program running
We have some ancient Delphi code (might have even originated as Turbo Pascal code)
curious if anyone might have some insight in how I would do the following
I think it might have been asked before but i was unable to find
I think I might have done something right, headByRating and headByName both refer to

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.