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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:16:47+00:00 2026-05-22T00:16:47+00:00

Pessimistic as to whether this is even possible, but what I’d like to do

  • 0

Pessimistic as to whether this is even possible, but what I’d like to do is populate a ContentPlaceholder on the Master Page from a User Control on the View.

More specifically, I would like to put a block in my master page like:

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        <asp:ContentPlaceHolder ID="StartupScript" runat="server" />
    });
</script>

Then in my page, I add my user control like:

<%Html.RenderPartial("MyUserControl");%>

Then have MyUserControl put some javascript that it wants to run at startup into the StartupScript placeholder on the master page, like:

<div id="MyUserControl"></div>

<Content ID="StartupScriptContent" ContentPlaceholderID="StartupScript" runat="server">
    $("#MyUserControl").load(...);
</Content>

In case it isn’t obvious, the javascript isn’t the actual use case. In case anyone is curious, I’d like to initialize the DynaTree jQuery plugin when the DOM loads, only if the UserControl is on the p

  • 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-22T00:16:48+00:00Added an answer on May 22, 2026 at 12:16 am

    A Control (including an ASCX partial in MVC) is simply rendered where ever you tell it to be rendered in the parent page/control markup.

    So, if you want the output of a control to end up going into a ContentPlaceholder, wrap the tag for it in the page with the Content tag. But it’s not valid to put Content tags directly in controls/partials.

    I suspect there may be another way to do what you are thinking of, though; maybe someone else will have a brain fart regarding that, or maybe you could elaborate on why you need it.

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

Sidebar

Related Questions

I would like some advice from anyone experienced with implementing something like pessimistic locking
Assuming I'm doing something like this (from the Active Record Querying guide ) Item.transaction
How to implement pessimistic locking in a php/mysql web application? web-user opens a page
1) What is more appropriate/commonly used approach for concurrency control? Pessimistic or optimistic locking?
i have spring project under java, using hibernate query, i like to use pessimistic
This is regarding amortized analysis. Following is text from an article. Amortized analyis for
We are using messaging in a project of ours to implement pessimistic concurrency. This
I'm using the EclipseLink implementation of the JPA 2.0 which allows pessimistic locking. I
I have a java project that runs on a webserver. I always hit this
List esns=session.createQuery(from Pool e where e.status=:status + order by uuid asc) .setString(status, AVAILABLE) .setMaxResults(n)

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.