Posts

Showing posts from September, 2020

Split String into string Array using c#

e.g : string emopt="3:13:250000:2.13";  List<string> ArrEMISingle = new List<string>(emopt.Split(new string[] { ":" }, StringSplitOptions.None));   foreach (var emopt in ArrEMI)                     {                         if (emopt != "")                         {                             List<string> ArrEMISingle = new List<string>(emopt.Split(new string[] { ":" }, StringSplitOptions.None));                             var duration = ArrEMISingle[0];                             var interest = ArrEMISingle[1];                   ...

Get Device Type C# Asp.Net

 public static bool IsMobileBrowser()     {         bool IsMobileDevice = false;         try         {             HttpContext context = HttpContext.Current;             if (context.Request.UserAgent != null)             {                 if ((context.Request.UserAgent.ToLower().Contains("mobile") || context.Request.UserAgent.ToLower().Contains("android")))                 {                     //IsMobileDevice = true;                     IsMobileDevice = IsTablet(context.Request.UserAgent.ToLower(), true);                 }             }         }   ...

CSS Media Query Targetting Device

/*# Mobile*/ @media only screen and (min-width: 480px) { } /*# Tablet*/ @media only screen and (min-width: 768px) { } /*# Desktop*/ @media only screen and (min-width: 992px) { } /*# Huge*/ @media only screen and (min-width: 1280px) { }