Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to validate if date is a weekday or weekend c#

DayOfWeek today = DateTime.Today.DayOfWeek;
if (today == DayOfWeek.Sunday || today == DayOfWeek.Saturday)
{
  ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" weekend"');", true);
}
else
{
    ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" weekday"');", true);
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to change dictionary value in c# 
Csharp :: unity c# change animation 
Csharp :: c# findindex 
Csharp :: while c# 
Csharp :: how to concert a list into strinf splitted by coma c# 
Csharp :: c# .net 3.5 post json httpclient 
Csharp :: how to find current country c# 
Csharp :: c# convert enumb to int array 
Csharp :: access object property C# 
Csharp :: c# handle dbnull value 
Csharp :: check if value in list c# 
Csharp :: list min and Max value in c# 
Csharp :: how to skip bin/Debug/netcoreapp3.1/ on the reltaive path 
Csharp :: create new object from generic c# 
Csharp :: string to char array c# 
Csharp :: Get enum value from string or int 
Csharp :: returning multiple values in C# 
Csharp :: Map Range Clamped unity 
Csharp :: c# foreach namevaluecollection 
Csharp :: c# remove all items from list where item value is null 
Csharp :: unity public static variable 
Csharp :: visual studio c# mark class deprecated 
Csharp :: how to turn components on and off in unity through code 
Csharp :: using in c# 
Csharp :: mysqldump - date 
Csharp :: how to fix on GetMouseButtonDown activating UI unity 
Csharp :: c# add strings 
Csharp :: preprocessors in c# 
Csharp :: c# static 
Csharp :: open linkedlabel c# 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =