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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:37:27+00:00 2026-05-19T16:37:27+00:00

what disadvantages are there to use inner HTML to populate a div tag consider,

  • 0

what disadvantages are there to use inner HTML to populate a div tag
consider, all scenarios possible.
Thanku

  • 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-19T16:37:28+00:00Added an answer on May 19, 2026 at 4:37 pm

    One disadvantage is that you’ll need to escape special characters manually. So, you’ll need to encode characters like >, <, and & (see the Wikipedia article on HTML encoding).

    This is pretty trivial to do since there are utilities to do this baked into the .NET libraries, like HttpServerUtility.HtmlEncode, but many people will forget this and not test all the special cases.

    Another downside, is that if you’re just populating a div with some arbitrary HTML, that means you’re probably building the HTML manually, which can go wrong if you’re just using string concatenation or something primative like that.

    If you’re doing this client side, it’s much better to just rely on appending elements to the DOM, rather than setting innerHTML.

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

Sidebar

Related Questions

Possible Duplicate: Are there disadvantages to using a generic varchar(255) for all text-based fields?
http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can
In SQL Server 2005, are there any disadvantages to making all character fields nvarchar(MAX)
Which is the right/best tag to use in my HTML file when I want
Are there performance disadvantages when I use a single-element array over a simple variable?
Possible Duplicate: Are there any disadvantages to always using nvarchar(MAX)? Is there a general
Are there any disadvantages or performance slowdowns related to the use of expressions like
I develop some PHP project on Linux platform. Are there any disadvantages of putting
Are there any advantages or disadvantages to using multiple assignment in a statement? In
What semantic web frameworks are there, and what are the advantages / disadvantages of

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.