本文介绍了如何使用所有时区填充下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我对时区有疑问,我想用世界上所有时区填写下拉列表,当我选择其中一个时我想保存该下拉列表的选定值,为此我使用代码 ReadOnlyCollection< TimeZoneInfo>的TimeZoneInfo; timezoneInfo = TimeZoneInfo.GetSystemTimeZones(); strTimezone = string .Join( ; ,来自时间 timezoneInfo 选择 string .Format( {0}:{1}, Time.Id,Time.DisplayName)); 但借助我的下拉列表是只有一个时区chennai kolkatta,因为我的系统只有一个时区chennai kolkatta,下拉列表只包含一个值,但我想要所有的时区,我想做的请尽早帮助我。解决方案 I have question about timezone, i want to fill the dropdown with all timezone in world and when i select one of them i want to save the selected value of that dropdown, for that i use the codeReadOnlyCollection<TimeZoneInfo> timezoneInfo;timezoneInfo = TimeZoneInfo.GetSystemTimeZones();strTimezone = string.Join(";", from Time in timezoneInfoselect string.Format("{0}:{1}",Time.Id, Time.DisplayName));but with the help of that my dropdown is fill with only one timezone which is chennai kolkatta because my system has only one timezone which is chennai kolkatta that dropdown contain only one value, but i want all timezone for that what i do please help me as early as possible. 解决方案 这篇关于如何使用所有时区填充下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-10 10:55