I am endeavoring to render leading spaces in a DropDownList (Ddl).
the Ddl is bound to a DataTable from my c# codebehind.
I am new to this, not familiar with all the syntax and the usage of all the available <tags>
I have read and tested "The browser is rendering spaces as one space" and believe this is my issue...
BTW I am rendering a up to 6 digit number followed by some text...
_____1 person full name
____10 different person name
___101 another person name
__1234 yet another
Please do not rely on my testing below, as my implementation could have made THE PROPER SOLUTION not work...
I have tried:
1) used leading " ", " ", "& nbsp;", " + " -" + " " + string and I reliably get the escape characters rendered perfectly!
2) <pre></pre>, besides messing up my webform it still renders one space or the in the control
3) several other formatting suggestions, however method I use to format they all create data in my table which I view with vs. It does not matter how you format the resulting string in the table is what gets passed to the control
ddlStd.Proc = "GetddlDivisionsProc"; // set proper sproc for data
ddlDropDownList.DataSource = ddlStd.OutTable; //get the data table, (ddlStd gets the data from sqldb and
concatenates columns then adds row by row to the table, resulting in a two row table 1 for "value" and the other for "text")
ddlDropDownList.DataValueField = "Value";
ddlDropDownList.DataTextField = "Text";