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
  • 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. 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

You might have a set of properties that is used on the developer machine,
I have a situation where I might have multiple instances of a program running
curious if anyone might have some insight in how I would do the following
Let's say I have two models, Classes and People. A Class might have one
In a previous life, I might have done something like this: <a href=# onclick=f(311);return
In a typical enterprise scenario with in-house development, you might have dev, staging, and
I'm using linq to pull back an object (i.e. customer) that might have a
If I'm making a simple grid based game, for example, I might have a
I have double (or float) variables that might be empty, as in holding no
I am using a 3rd-party rotator object, which is providing a smooth, random rotation

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.