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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:42:58+00:00 2026-06-18T12:42:58+00:00

I have an Area like below. Below are the Controller actions. [HttpGet] public ActionResult

  • 0

I have an Area like below.

enter image description here

Below are the Controller actions.

[HttpGet]
public ActionResult Index_partial()
{
    return PartialView("_PartialPage1");
}

[HttpGet]
public ActionResult Index()
{
    AdminModule model = new AdminModule();
    model.MyName = "My Name";
    return View("Index", model);
}

View

@model _1.Areas.Admin.Models.AdminModule
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutPage1.cshtml";
}
<h2>
    Index</h2>
<script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript">
</script>
<script type="text/javascript" src="/scripts/jquery.unobtrusive-ajax.js">
</script>
<div id="myForm">
    @using (Html.BeginForm())
    {
        <p id="pid">
        </p>
        <input onclick="ClickHere();" type="submit" value="Button" />
    }
    <script language="javascript" type="text/javascript">
        function ClickHere() {
        debugger;
            var url = '@Url.Action("Index_partial", "Admin")';
            $('#p').load("@Url.Action("Index_partial", "Admin")");
        }

    </script>
</div>

===================================

Partial View

@model _1.Areas.Admin.Models.AdminModule
@using (Ajax.BeginForm("Index", "Admin", 
             new AjaxOptions { UpdateTargetId = "myForm", HttpMethod = "Post" }))
{
    @Html.LabelFor(i => i.MyName)
    @Html.TextBoxFor(i => i.MyName)
    @Html.ValidationMessageFor(i => i.MyName)
    <p id="getDateTimeString">
    </p>
    <input type="submit" value="Click here" id="btn" />
}

=====================================

In the View, I have a button, on clicking it should render the Partial View in

<p id="pid"></p>

Issue is – on clicking the button is navigating the page to Partial View, It should instead render the Partial View Html in p tag. How to do this ?

  • 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-06-18T12:42:59+00:00Added an answer on June 18, 2026 at 12:42 pm

    View should be like this…

    <div id="myForm">
        <p id="pid">
        </p>
    </div>
    <input id="BTN" type="submit" value="Button" />
    <script language="javascript" type="text/javascript">
        $('#BTN').click(function(){
            $('#pid').load("@Url.Action("Index_partial", "Admin")");
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Area like below. Controller Class public class AdminController : Controller {
I have a controller action as the below public class HomeController : BaseController {
I have a table AreaUser like below. area user ------------ area2 user1 area2 user2
I have a panel whose items are a list and a panel like below
In C, I have declared a memory area like this: int cells = 512;
I have a text area on which I would like to listen to change
I would like to have the cursor in the JavaDoc area when creating interfaces,
I have list of input area in the form with id like contact1_title, contact2_title,
I would like to have my site’s logo shown in the icon area of
I have a text input field like text box or text area. I want

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.