none
How should code be formatted in TechNet Wiki? RRS feed

  • General discussion

  • One popular way is to insert the code in an HTML-based table, like this:

     

    <table border="1" cellspacing="0" cellpadding="2">
      <tbody>
        <tr style="background-color: #d7d6d4;">
          <th valign="top">SQL Server 2008R2 Express</th>
          <th>Management Studio Basic</th>
          <th>Runtime Only</th>
          <th>with Tools</th>
          <th>with Advanced Services</th>
        </tr>
        <tr>
          <td valign="top">
          <p>SQL Server Database Engine</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
        </tr>
        <tr>
          <td valign="top">
          <p>SQL Server Management Studio Basic</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
        </tr>
        <tr>
          <td valign="top">
          <p>Full-Text Search</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
        </tr>
        <tr>
          <td valign="top">
          <p>Reporting Services</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top">
          <p>&nbsp;</p>
          </td>
          <td valign="top" align="center">
          <p>X</p>
          </td>
        </tr>
        <tr>
          <td valign="top">
          <p>Download Size</p>
          </td>
          <td valign="top">
          <p>38.5 MB</p>
          </td>
          <td valign="top">
          <p>82.5 MB</p>
          </td>
          <td valign="top">
          <p>230.4 MB</p>
          </td>
          <td valign="top">
          <p>546.5 MB</p>
          </td>
        </tr>
      </tbody>
    </table>


    This table is from Larry Franks here: http://social.technet.microsoft.com/wiki/contents/articles/how-to-embed-sql-server-express-in-an-application.aspx

    This method gives you the right font, color, and it gives you a scrollbar.

    Copying and pasting the code from this table isn't too hard, but it would be easier with a Copy button.

     

    What do you think? Is there a better way?


    Ed Price a.k.a User Ed, Microsoft xPM = Experience Program Manager (Blog, Twitter)
    • Changed type tonysoper_MSFT Monday, September 12, 2011 5:33 PM feature feedback
    Monday, August 15, 2011 11:07 PM
    Owner

All replies

  • My experiment didn't give me the color, formatting, or scroll bar from the Wiki. I wonder if the Forums and Wiki handle the same code differently.
    Ed Price a.k.a User Ed, Microsoft xPM = Experience Program Manager (Blog, Twitter)
    Monday, August 15, 2011 11:09 PM
    Owner