Sunday, 1 November 2015

check valid date time or not

  public bool IsValidDatetime(string strValue)
        {

            //return Convert.ToDateTime(strValue)
            DateTime fromDateValue;
            string s = "15/07/2012";
            var formats = new[] { "dd/MM/yyyy", "yyyy-MM-dd" };
            if (DateTime.TryParseExact(s, formats, CultureInfo.InvariantCulture, DateTimeStyles.None, out fromDateValue))
            {
                return true;
                // do for valid date
            }
            else
            {
                return false;
                // do for invalid date
            }
        }

Wednesday, 28 October 2015

How to disable back button after login in c#(Web application)

Add it in deafult.aspx page

<script type="text/javascript">
        window.history.forward();
        function noBack() { window.history.forward(); }

    </script>

Tuesday, 22 September 2015

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

HTTP Error 500.21 - Internal Server Error

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list




First need to installed aspnet_regiis

the aspnet_regiis is in the bellow path 
C:\Windows\Microsoft.NET\Framework\v4.0.30319


Go to command prompt right click on cmd prompt Run as administrator  and go to the path then type aspnet_regiis.exe -i that's it