Friday, April 27, 2012

Comma appeared in textbox in Chrome browser Fixing by Jquery


 <script type="text/javascript">
        function filterElements() {
            $("#<%=TabContainer1.ClientID %>").find("input[type=text]").each(function () {
                val = $(this).val();
                val = val.replace(/^[,\s]+|[,\s]+$/g, '').replace(/,[,\s]*,/g, ','); //replace(/\b,/g,"");
                $(this).val(val);
            });
            $("#<%=TabContainer1.ClientID %>").find("textarea").each(function () {
                val = $(this).val();
                val = val.replace(/^[,\s]+|[,\s]+$/g, '').replace(/,[,\s]*,/g, ','); //replace(/\b,/g,"");
                $(this).val(val);
            });
            //alert($("#<%=TabContainer1.ClientID %>").find("input[type=text]").size());
        }
</script>

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...