How to solve the issues of popup close in crome browser while dragging to outside the popup
You need to pass option parameter in popup js call blur=false so it will not close the popup in crome.
Kalpesh Satasiya 9:23 AM chrome browser, jquery, popup area, Popup close No comments
Crop Image
Kalpesh Satasiya 5:51 PM blog post, Other, tech coder, tech-coder.com No comments
Kalpesh Satasiya 6:34 PM ajax, Chosen plugin, JavaScript, jquery, jquery plugins 1 comment
Step2 :: Call dropdown initialize functions (i.e for Chosen)
Step3:: Ajax call for get subcategory and update dropdown using trigger action so css of dropdown bind again.
Happy Coding!
Kalpesh Satasiya 4:24 PM asp.net, Asp.Net 5, JavaScript, MVC, Razor view No comments
Hope you are getting and useful.
Kalpesh Satasiya 8:30 PM asp.net, C#, string, tech coder, tech-coder.com 2 comments
var intValue1 = Convert.ToInt32("-52.066666"); // error var intValue2 = Convert.ToInt32("52.066666"); // error var intValue3 = Int32.Parse("52.066666"); // error var intValue4 = Int32.Parse("52"); // Correct var intValue1 = Convert.ToInt32("-52"); // CorrectHope you getting basic idea for string conversion issue.
Kalpesh Satasiya 5:13 PM DENSE_RANK, RANK, sql query, sql server No comments
DECLARE @Table TABLE ( column varchar(2) ) INSERT INTO @Table (column) VALUES ('A'),('A'),('A'),('B'),('B'),('C'),('C'); SELECT Col_Value, Rank() OVER (ORDER BY column) AS 'Rank', DENSE_RANK() OVER (ORDER BY Col_Value) AS 'DENSE_RANK' FROM @Table;
Column | RANK | DENSE_RANK |
A | 1 | 1 |
A | 1 | 1 |
A | 1 | 1 |
B | 4 | 2 |
B | 4 | 2 |
C | 6 | 3 |
C | 6 | 3 |
Kalpesh Satasiya 2:37 PM asp.net, C#, ToClone(), ToCopy() No comments
var strArr1 = new string[] { "1", "2", "3","4" }; var strArr2 = strArr1 ; //copy
var strArr3 = new string[] { "1", "2", "3","4" }; var strArr2 = strArr1.ToClone(); //Clone
Kalpesh Satasiya 7:33 PM AngularJs, jquery, Node.js 2 comments
Kalpesh Satasiya 9:11 PM JavaScript, jquery, SCRIPT1002: Syntax error No comments
Click Me!Yes, that is the problem. void is an operator, not a function.
Kalpesh Satasiya 5:20 PM asp.net, Asp.Net 5, asp.net 5 features, asp.net MVC 6, MVC 6 features No comments
@model FirstProject.Models.Categories @using (Html.BeginForm()) {@Html.LabelFor(m => p.Name, "Name:") @Html.TextBoxFor(m => p.Name)}
@model FirstProject.Models.Categories @addtaghelper "Microsoft.AspNet.Mvc.TagHelpers"
using Microsoft.AspNet.Mvc; using System; namespace Partials.Components { public class TextPrint : ViewComponent { public IViewComponentResult Invoke() { return View("_TextPrint", "Hello This is for test!"); } } }Here how look like the _TextPrint partial.
@model stringNow, let see how we can usre the TextPrint View Compenent in MVC view.@Model
@Component.Invoke("TextPrint")
public class HomeController : Controller { [Activate] public TestClass TestClass { get; set; } }Asp.Net 5 also supports Dependency Injection into Razorviews via the @inject keyword.
@using WebApplication23 @inject TestClass Testclass9. xUnit.net@ViewBag.Message
[TestClass] public class ProductTests { [TestMethod] public void TestAddProduct() { //Write your code } }
public class ProductTests { [Fact] public void TestAddProduct() { //Write your code } }
Kalpesh Satasiya 10:52 AM asp.net, Asp.Net 5, asp.net MVC 6, MVC 6 No comments
Kalpesh Satasiya 2:00 PM Search text in stored procedure, sql query, sql server, Sql server 2012, Sql server 2014, Sql server feature, Sql Server Services No comments
Kalpesh Satasiya 12:58 PM Failed to access IIS metabase, get contact from hotmail, get contect from yahoo, Golang Configure, import contect from gmail, Kalpesh Satasiya, non-www to a www, Other, XML Parse, youtube embeded code No comments
Kalpesh Satasiya 12:48 PM .CS class, asp.net, Asp.Net 5, asp.net MVC 6, Enum to HashTable No comments
Kalpesh Satasiya 11:37 AM jquery, OnKeyPress event, textarea No comments
Here we have one textarea and define id as txtcomment. so I am going to attached keypress event for textarea.
function restrictLenght() { var tval = $('#txtcomment').val(), return tval.length < 250; }
Kalpesh Satasiya 3:31 PM AngularJs, AngularJs Factory, AngularJs Provider, AngularJs Services, tech-coder.com No comments
Kalpesh Satasiya 2:46 PM asp.net, C#, tech-coder.com No comments
Convert.ToString() handles null, while ToString() doesn't.
Kalpesh Satasiya 7:02 PM Other, software developer, software development, tech-coder.com No comments
Kalpesh Satasiya 3:55 PM .CS class, asp.net, GridView, Header No comments
if (dt.rows.count > 0) { grdview.DataSource = dt; grdview.DataBind(); } else { var dummyTable = new DataTable(); dummyTable.Columns.Add("Column1"); dummyTable.Columns.Add("Column2"); dummyTable.Rows.Add(dummyTable.NewRow()); grdview.DataSource = dummyTable; grdview.DataBind(); grdview.Rows[0].Style.Add(HtmlTextWriterStyle.Display, "none"); }Hope you would like it and please share your suggestions and comments for improvement.
Kalpesh Satasiya 1:37 PM AngularJs, Dependency Annonation, Dependency Injection 1 comment
//define a module var mainApp = angular.module("mainApp", []); mainApp.controller('MathsFunController', ['$scope', 'mathService', function($scope, mathService) { // ... }]);Here we pass an array whose elements consist of a list of strings (the names of the dependencies) followed by the function itself.
//define a module var mainApp = angular.module("mainApp", []); var MathsFunController = function($scope, mathService) { // ... } MathsFunController.$inject = ['$scope', 'mathService']; mainApp.controller('MathsFunController', MathsFunController);Implicit Annotation
Careful: If you plan to minify your code, your service names will get renamed and break your app.The is the simplest way to inject the dependencies because of dependencies is to assume that the function parameter names are the names of the dependencies.
//define a module var mainApp = angular.module("mainApp", []); mainApp.controller('MathsFunController', function($scope, mathService{ // ... });Above a function, the injector can refer the names of the servies to inject at function declaration and extracting the parameter names.
Kalpesh Satasiya 10:51 AM AngularJs, AngularJs Component, Dependency Injection 1 comment
//define a module var mainApp = angular.module("mainApp", []); //create a value object as "defaultValue" and pass it a value. mainApp.value("defaultValue", 5); //inject the value in the controller using its name "defaultValue" mainApp.controller('MathsFunController', function($scope, defaultValue) { $scope.number = defaultValue; });Factory
//define a module var mainApp = angular.module("mainApp", []); //create a factory "MultiplyService" which provides a method multiply to return multiplication of two numbers mainApp.factory('MultiplyService', function() { var factory = {}; factory.multiply = function(a, b) { return a * b } return factory; }); //inject the factory "MultiplyService" in a service to utilize the multiply method of factory. mainApp.service('MathService', function(MultiplyService){ this.square = function(a) { return MultiplyService.multiply(a,a); } });
//define a module var mainApp = angular.module("mainApp", []); //create a service which defines a method square to return square of a number. mainApp.service('MathService', function(MultiplyService){ this.square = function(a) { return MultiplyService.multiply(a,a); } }); //inject the service "MathService" into the controller mainApp.controller('MathsFunController', function($scope, MathService, defaultValue) { $scope.number = defaultValue; $scope.result = MathService.square($scope.number); $scope.square = function() { $scope.result = MathService.square($scope.number); } });
//define a module var mainApp = angular.module("mainApp", []); //create a service using provider which defines a method square to return square of a number. mainApp.config(function($provide) { $provide.provider('MultiplyService', function() { this.$get = function() { var factory = {}; factory.multiply = function(a, b) { return a * b; } return factory; }; }); });
mainApp.constant("configParam", "constant value");
Kalpesh Satasiya 10:38 AM AngularJs, jquery, jquery plugins, Node.js No comments
Kalpesh Satasiya 10:27 AM Golang Configure, Golang installation, IDE, IntelliJ IDEA Configure, Other, Setup Golang No comments
Kalpesh Satasiya 9:24 AM AngularJs, Attributes, Custom Directives, Elements. No comments
<div custom-directives></div>
<div class="custom-directives : expression;"></div>3) As an element: (Restrict option : 'E')
<custom-directive></custom-directive>4) As a comment: (Restrict option : 'M')
< !--directive: custom-directive expression -->So let's time to go through some example's
<div ng-customdirective></div>
Kalpesh Satasiya 11:12 PM Asp.Net 5, C# 6.0, Dictionary Initializing, String Indexer No comments
Kalpesh Satasiya 11:01 PM asp.net, C# 6.0, Microsoft No comments
Check about example, we have two property "Name" and "City". So in classic way we need to assign property value during object initialization it means under constructor.public class TestClass { public string Name { get; set; } public string City { get; set; } public TestClass() { //Assign value to property Name = "Kalpesh"; City = "Ahmedabad"; } }
public class TestClass { public string Name { get; } = "Kalpesh"; public string City { get; set; } = "Ahmedabad"; }
Kalpesh Satasiya 10:51 AM Columnstore index, Sql server 2012, Sql server 2014 No comments
Kalpesh Satasiya 11:05 PM Editor, JavaScript, Visual Studio 2015 No comments
Kalpesh Satasiya 11:00 PM NopCommerce, Theme, Theme Integration No comments
Kalpesh Satasiya 10:11 PM Sql server feature, TRY_CONVERT() 1 comment
Kalpesh Satasiya 11:04 PM Paging, sql query, Sql server 2012 No comments
Kalpesh Satasiya 8:49 PM Asp.Net 5, NuGet Packages No comments
Kalpesh Satasiya 4:05 PM IDE, Theme, Visual Studio No comments
Kalpesh Satasiya 3:26 PM asp.net, C#, Friend Assemblies, Internal class, Unit Test cases No comments
Interal class InternalClass { public void Test() { Console.WriteLine("Sample Class"); } }If would like to access InternalClass on another assemblies then need to define each assemblies name on AssemblyInfo.cs with following line.
[assembly: InternalsVisibleTo("name of assembly here")]
i.e. If you want access InternalClass on assembly ABC then you will need to mention on AssemblyInfo.cs file for same.[assembly: InternalsVisibleTo("ABC")]
Hope that is help to you!!Kalpesh Satasiya 7:28 PM sql server, Sql Server Services, Windows 10 No comments
Kalpesh Satasiya 5:56 PM List, List to String, string 1 comment
Kalpesh Satasiya 2:37 PM .Net, FluentValidation, MVC, NopCommerce, WebApi No comments
Kalpesh Satasiya 1:53 PM Add new table, Controller, Entity Framwork, Model, MVC, NopCommerce, software developer, software development, View 2 comments
Mapper.CreateMap<MyTest, MyTestModel>() .ForMember(dest => dest.Name, mo => mo.Ignore()) .ForMember(dest => dest.MyTestId, mo => mo.Ignore()); Mapper.CreateMap<MyTestModel, MyTest>() .ForMember(dest => dest.Name, mo => mo.Ignore()) .ForMember(dest => dest.MyTestId, mo => mo.Ignore());
6. Apply Mapping between Model and Entity on MappingExtensions.cs