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

  • SEARCH
  • Home
  • 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 7057827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:02:20+00:00 2026-05-28T04:02:20+00:00

I have called a view from another with Html.Action method. I want to call

  • 0

I have called a view from another with Html.Action method. I want to call the same action with a parameter Inside the child view, when user click the action link.

When I write this code I get this error message:

Html.ActionLink("link", "Configure", new { id = 2 })

The action ‘Configure’ is accessible only by a child request.

How can i handle this issue?

Edit: I’ll try to reexplain the issue:

my parent view is ConfigureMethod.cshtml. I call child child view like that:

@Html.Action("Configure", "Payment");

It goes to this controller and returns actionresult(not partialview) inside ConfigureMethod view:

[ChildActionOnly]
public ActionResult Configure()
{

}

inside configure view i make an action link like that:

Html.ActionLink("link", "Configure", new { id = x.Id })

It should goes to this controller:

[ChildActionOnly]
public ActionResult Configure(int Id)
{

}

However when childonly attribute is written it gives error. When I remove this attribute it works but results comes directly, not inside ConfigureMethod view.

thanks.

  • 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. Editorial Team
    Editorial Team
    2026-05-28T04:02:21+00:00Added an answer on May 28, 2026 at 4:02 am

    There are two things I would like to point out,

    1. Child actions are only meant to be rendered as PartialView. So decorating with [ChildActionOnly] attribute means, this is the action must return PartialViewResult.

    2. When we are calling ActionLink(), it will generate a link to a View not Partial View. Even if you will not decorate with [ChildActionOnly], then a link to a partial view makes no sense.

    So, first decide if you want a View or Partial View and then design accordingly.

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

Sidebar

Related Questions

I have this managedContextObject I want to pass from a view controller to another.
I have a controller named AccountController and action called ResetPassword. From the html markup
We have a View (call it X) that is the base view called by
I have a file called 34.php?session=2534464a39a2c97cb7113689726a4e52 in my /var/www/html folder but I can't view
I have a view and template called index.html. I have a image which is
If I have say a Partial View called MypartialView and I have a HTML
If you have a controller method like so: @expose(json) def artists(self, action=view,artist_id=None): artists=session.query(model.Artist).all() return
I have a view controller that is called from 2 different places. 1) I
I have a View (called MyView) in my Layout file. I want to content
General context : MVVM application. I have a View called JobView. Its DataContext is

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.