user2715134
user2715134

Reputation: 11

How to add spaces HTML output

In the below code I want to create spaces when it is executed that is I want to see spaces "HSC&nbsp" + txthsc.Text + "&nbspHSC" + txthscclg.Text + "

between HSC and txthsc tag so please help.. string strBody = "" + "" +

               "<div>Your name is: <b>" + txtaddress.Text + "</b></div>" +
               "<div> your Gender:<b>"+txtgender.Text+"</b></div>"+
                "<div> your skills:<b>" + txtskills.Text + "</b></div>" +
                 "<div> your experience:<b>" + txtexp.Text+ "</b></div>" +
                  "<div> your phno:<b>" + txtphno.Text + "</b></div>" +
               "<table width=\"100%\" style=\"background-color:#cfcfcf;\"><tr><td>1st Cell body data</td><td>2nd cell body data</td></tr></table>" +

              "<table width=\"500%\" style=\"background-color:#cfcfcf;\"><tr><td>BBA<b>&nbsp" + txtbba.Text + "&nbsp</td><td>HSC<b>" + txtbbaclg.Text + "</td></tr></table>" +
              **"<table width=\"500%\" style=\"background-color:#cfcfcf;\"><tr><td>HSC<b>&nbsp" + txthsc.Text + "&nbsp</td><td>HSC<b>" + txthscclg.Text + "</td>**</tr></table>" +
              "<table width=\"500%\" style=\"background-color:#cfcfcf;\"><tr><td>SSC<b>&nbsp" + txtssc.Text + "&nbsp</td><td>HSC<b>" + txtsscclg.Text + "</td></tr></table>" +
               "Resume document generated successfully."+
           "</body>" +
           "</html>";

Upvotes: 0

Views: 819

Answers (1)

Shumail
Shumail

Reputation: 3143

i think you are missing ; from &nbsp - Correct entity is &nbsp;

Upvotes: 3

Related Questions