简体   繁体   中英

get the value of date picker used in gridview

i have create dynamic datepicker inside gridview. i want to know how to get the values of the datepicker

help me out!!

i have used this line

 DateTime date2 = DateTime.Parse(((TextBox)Gridview1.Rows[rowIndex].Cells[3].FindControl("frmdate_endtime")).Text);

Why not cast the control to the appropriate date/time picker class and take the value from that directly? You shouldn't need to parse the text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM