Hello I have a textbox, And I want to save the value of textbox into two different fields
For example
the value of texbox is
02/10/2015
and the fields are date and year.
So the result will be
date year
02/10 2015
thanks
Refer this code snippet
C#
string date = "02/10/2015"; string[] splitedDate = date.Split('/'); //Save this in MonthDay field string monthDay = string.Join("/", splitedDate[0], splitedDate[1]); //Save this in Year field string year = splitedDate[2];
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.