I have a js file which needs some html div content. where exactly I have to add div tags content in aspx page in SP designer 2010 .

Thank you.

  • Which page are you editing? – variable Mar 14 '14 at 8:58
  • list DisplayForm.aspx – Flying Hope Mar 14 '14 at 9:06

Create a new display form for the list and set it as default.

Then in this new display form, Search for <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> and paste your div below that tag.


Your question doesn't specify what's the purpose of the div, anyhow, being javascript, the div doesn't really need to exist beforehand. You can first inject it into the body, then call the function that needs it.

With jQuery it's something like:

$('body').append($('<div id="myDiv">')).


This saves you from having to unghost the display form page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.