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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:14:25+00:00 2026-06-16T03:14:25+00:00

please help me this my C# code behind SpecialOffersDiv.InnerHtml = <div class=offer_box_wide> <a href=><img

  • 0

please help me
this my C# code behind

  SpecialOffersDiv.InnerHtml = "<div class="offer_box_wide">
                                  <a href=""><img src="../images/p1.jpg" width="130" height="98" class="img_left" alt="" border="0" /></a>
                                  <div class="offer_info"> <span>For Sale 150 000 $</span>
                                  <p class="offer"> &quot;Lorem ipsum dolor sit</p>
                                  <div class="more"><a href="#">...more</a></div>
                                  </div>
                                  </div>";
  • 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-16T03:14:27+00:00Added an answer on June 16, 2026 at 3:14 am

    Your problems are being caused by two things. First, the double-quote marks within the string need to be escaped. Second, the new lines need to be handled appropriately. There are two ways to accomplish this.

    First, you could use the verbatim string literal indicator and then double each double-quote mark in the string.

    SpecialOffersDiv.InnerHtml = @"<div class=""offer_box_wide"">
                                   <a href=""""><img src=""../images/p1.jpg"" width=""130"" height=""98"" class=""img_left"" alt="""" border=""0"" /></a>
                                   <div class=""offer_info""> <span>For Sale 150 000 $</span>
                                   <p class=""offer""> &quot;Lorem ipsum dolor sit</p>
                                   <div class=""more""><a href=""#"">...more</a></div>
                                   </div>
                                   </div>";
    

    Second, you could escape the double-quotes with a backslash and change the newlines to \n:

    SpecialOffersDiv.InnerHtml = "<div class=\"offer_box_wide\">\n" +
                                 "<a href=\"\"><img src=\"../images/p1.jpg\" width=\"130\" height=\"98\" class=\"img_left\" alt=\"\" border=\"0\" /></a>\n" +
                                 "<div class=\"offer_info\"><span>For Sale 150 000 $</span>\n<p class=\"offer\"> &quot;Lorem ipsum dolor sit</p>\n" +
                                 "<div class=\"more\"><a href=\"#\">...more</a></div>\n" +
                                 "</div>\n" +
                                 "<`div>";
    

    I’d say go with the first, it looks much nicer.

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

Sidebar

Related Questions

Could anyone please help me convert this code to vb.net, I have tried it
Could you please help me converting this c++ code into python: I am trying
Hey friends any one please help me for this issue.in this javascript code i
Please i need help, this code below works fine on my localhost, php5.3+ but
Please, help me. I dont know what is wrong with this code: import android.appwidget.AppWidgetProvider;
Couldn't find anything relevant in forums So ,Please help me with this code .I'm
Please help me, i am new to WP7 development.I have a class like this
Please help this would be my last problem in dealing with access database with
Please help this beginner here... I have a SQL Server 2008 R2 running on
Please help me with this update query. I COMPLETELY understand how redundant this 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.