摘要:ASP.NET C# DropDownlist Textfield 字串格式化 補0
ddl.DataSource = Getdatatable();
ddl.DataTextField = "dataText";
ddl.DataValueField = "dataValue";
ddl.DataTextFormatString = "{0:D2}"; //D2代表不足位數補0
ddl.DataBind();
摘要:ASP.NET C# DropDownlist Textfield 字串格式化 補0
ddl.DataSource = Getdatatable();
ddl.DataTextField = "dataText";
ddl.DataValueField = "dataValue";
ddl.DataTextFormatString = "{0:D2}"; //D2代表不足位數補0
ddl.DataBind();