I am doing something to prepare a string to display in a format in server side but now I have to replace it in javascript so my server side code is:
DateTime now = DateTime.Now;
string date = now.GetDateTimeFormats('d')[0];
string time = now.GetDateTimeFormats('t')[0];
txtFileName.Value = someString.Length > 10 ? someString.Substring(0, 10).TrimEnd() + "_" + date + "_" + time : someString.TrimEnd() + "_" + date + "_" + time;
txtFileName.Value = txtFileName.Value.Replace(' ', '_');
How to achieve that?