Two CalendarExtenders?

你离开我真会死。 提交于 2019-12-11 01:08:57

问题


I have a popup ajax calendarextender that populates a text box with the selected date, (MM/dd/yyyy). This works. I want to capture the same date in an additional text box with a different format (yyyyMMdd). The first is for display and the second date is a parameter for gridview query. Is this done with two calandarextenders? (btw I'm using C#)


回答1:


If you are supplying one to a query, you could just change the parameter value in code before supplying it to the query.

 var datetimeForQuery = extenderVariable.SelectedDate.ToString("yyyyMMdd");


来源:https://stackoverflow.com/questions/6734862/two-calendarextenders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!