Posts

Showing posts from 2019

Periodic Restart Settings for Application Pool Recycling

Image
Periodic Restart Settings for Application Pool Recycling <periodicRestart> Overview The  <periodicRestart>  element contains configuration settings that allow you to control when an application pool is recycled. You can specify that Internet Information Services (IIS) 7 recycle the application pool after a time interval (in minutes) or at a specific time each day. You can also configure IIS to base the recycle on the amount of virtual memory or physical memory that the worker process in the application pool is using or configure IIS to recycle the application pool after the worker process has processed a specific number of requests Compatibility Version Notes IIS 10.0 The  <periodicRestart>  element was not modified in IIS 10.0. IIS 8.5 The  <periodicRestart>  element was not modified in IIS 8.5. IIS 8.0 The  <periodicRestart>  element was not modified in IIS 8.0. IIS 7.5 The  <periodicRestart>  element was not modified in II

Get C# Enum Description from Name And Value

enum with Description attributes like this: public enum MyEnum { Transaction = 1 , [ Description ( "Transaction Detail" )] TransactionDetail = 2 , [ Description ( "Transaction Reference Number" )] TransactionRefno = 3 } I put the code together from the accepted answer in a generic extension method, so it could be used for all kinds of objects: public static string DescriptionAttr < T >( this T source ) { FieldInfo fi = source . GetType (). GetField ( source . ToString ()); DescriptionAttribute [] attributes = ( DescriptionAttribute []) fi . GetCustomAttributes ( typeof ( DescriptionAttribute ), false ); if ( attributes != null && attributes . Length > 0 ) return attributes [ 0 ]. Description ; else return source . ToString (); } Using an enum like in the original post, or any other class whose property is decorated with the Description attribute,

Disable Text Selection In WebPage Using CSS.

Image
To Disable Text Selection it takes only Two steps:- Make a HTML file and define markup for webpage Make a CSS file and define styling to disable the text Step 1.Make a HTML file and define markup for web page We make a HTML file and save it with a name  Index.html <!DOCTYPE html> <html> <head> < link rel = "stylesheet" type = "text/css" href = "disable.css" > </head> <body> < h1 > Disable Text Selection In Website Using CSS < /h1 > < p class = "select" > Select The Text In This Paragraph This Is Selectable Like Any Other Text < /p > < p class = "no_select" > Try To Select This Text You Are Not Able To Select This Text In Modern Browsers < /p > </body> </html> Step 2.Make a CSS file and define styling to disable the text We make a CSS file and save it with name  disable.css body { background - color