Greg Owen
Over 27 Years of Programming Experience
Programming Examples, Portfolio, and More

Create Dynamic Bubble Text

The examples below how to create dynamic bubble text. This allows you to feed text into a method and dynamically add the css required to display the text in a bubble format.

        private void DisplayBubbleText(string sVal)
            string sLetter = "";
            for (int i = 0; i <= sVal.Length - 1; i++)
                sLetter = sVal.Substring(i, 1);
                if (sLetter == " ")
                    pnlMain.Controls.Add(new LiteralControl("</div style=" + dQ("color:white;background-color:white;border-radius:50%;font-size:36px;height:50px;width:50px;text-align:center;display:inline-block;border-style:none;float:left;") + ">" + sLetter + "</div>"));
                    pnlMain.Controls.Add(new LiteralControl("</div style=" + dQ("color:white;background-color:dodgerblue;border-radius:50%;font-size:36px;height:50px;width:50px;text-align:center;display:inline-block;border-style:none;float:left;") + ">" + sLetter + "</div>"));


You can test the method using the drop down list below.


Add a C# Dropdown to a Bootstrap Modal Dialog

This example combines C# and Bootstrap to create a bootstrap modal dialog containing an asp dropdown and an asp button to retrieve...

Continue Reading

Use C# to Populate Dropdown Lists With XML

The code below opens an xml file, reads the data from the xml file, dynamically adds a label for the dropdown list, and adds the dropdown list to the page...

Continue Reading

Add Style Properties to ASP.Net Controls to Improve Appearance

The default formatting for ASP.Net controls is very dated.  The default formatting is basically the same as the formatting in Visual Basic 1.0 ...

Continue Reading

Export To A Text File From A DataGridView Control

Add a button control to Form1.
Add a DataGridView Control to Form1....

Continue Reading