Skip to main content

Posts

Tutorial for understanding Angularjs

What is angualarjs ? AngularJS is one of the most p opular JavaScript UI framework which works on client side MVVM model. Here client side means using JavaScript we will create the MVVM. The main advantage here for the AngularJS is Two-way data binding. The two-way data binding is quite easy and simple by using AngularJS. Main Component of Angularjs What is Services ? Services are singletons, which a re objects that are instantiated only once per app (by the $injector). They provide an interface to keep together methods that relate to a specific function. What is filters ? Filters are added to angularjs expression or directives in order to transform the displayed data , they are use by pipe symbol (" | " ). example of filter :- currency Format a number to a currency format. date Format a date to a specified format. filter Select a subset of items from an array. json Format an object to a JSON string. limitTo Limits an array/string, ...

How to do auto logout and redirect to login page when session expires using asp.net?

In this article I will explain you how to auto logout and redirect to  login page when users session expires within specific period. Introduction In every applications, we need to maintain the session expiration time  say for example 1hr or 30 minuets and this configuration item we  can do with web.config file or in IIS. But here, application should  redirect to login page automatically when session expires. Configure session time First configure the session timeout value in web.config file as like  below, here I’m configuring the session timeout value as 3 minutes  for this sample . < system.web > < sessionState mode = " InProc " timeout = " 3 " ></ sessionState > </ system.web >   Create Pagebase class create a custom pagebase class and write the common functionality codes into this class. Through this class, we can share the common functions to other web pages. In this class we need...

Paytm integration

How to integrate Paytm to asp.net site   You will need to create an Checksum on your server. Kindly refer the dll file for the attachment.  Usage of CheckSum API: ·         Add provided “paytm.dll” as a “Reference” in your project. ·         Import namespace “paytm” in your Class with statement “using paytm”. ·         Now Generate CheckSum API as well as Verify CheckSum API are available as follows: o   String CheckSum.generateCheckSum(String masterKey, Dictionary<String, String> parameters) o   Boolean CheckSum.verifyCheckSum(String masterKey, Dictionary<String, String> parameters, StringcheckSum) ·         For Generating CheckSum, use following snippet code: String masterKey = “merchantKey” ; Dictionary<String, String> parameters = new Dictionary<string, string>(); p...

What is the advantage of static class over class ?

.1  When we have a normal class and its methods being used very frequently in a given app, then it would speed up things if we made this class a static class with static methods. This is because there is always a cost incurred in terms of resource usage ( CPU, memory, time) EVERY TIME a normal class is instantiated, whereas for static class its only a ONE-TIME cost when static constructor is FIRST called.  2. The main advantage of Static Classes come when there is a need to use WebMethod or a webservice, so that the application can call the static method without creating an object.

Why To Use C#

Which one to use, C++ or C#?”, and many more similar questions. It is harder to provide an answer to such questions on multiple platforms and to multiple questions. That is why, I thought, why not post a blog post to cover most of the aspects of the question?  In this post I am going to cover a few of the concepts that you may want to understand to choose either language from the most widely used languages: C or C++ Java C#  (or .NET framework itself) Basically, my own preference in many cases is C#, but that depends on what I am going to build. I have been using C, C++, Java, and C # in many applications depending on their needs, depending on how they allow me to write the programs,  and depending on whether it is the suitable programming language for this type of project and application architecture. The way I do that,is just a trick which I am going to share with you in this blog post. Among these a few of the very basic things to consider are: How simple an...

C# 6

New feature No.1 in C# 6.0   1. using Static This is a new concept in C# 6.0 that allows us to use any class that is static as a namespace that is very usefull for every developer in that code file where we need to call the static methods from a static class like in a number of times we need to call many methods from Convert.ToInt32() or Console.Write(),Console.WriteLine() so we need to write the class name first then the method name every time in C# 5.0. In C# 6.0 however Microsoft announced a new behavior to our cs compiler that allows me to call all the static methods from the static class without the name of the classes because now we need to first use our static class name in starting with all the namespaces. In C# 5.0 In C# 6.0 Code in 5.0 using  System;   using  System.Collections.Generic;   using  System.Linq;   using  System.Text;   using  System.Threading.Tasks;   namespace...

C# @ very best

...future of C# is very bright.   In the following Channel 9 video, Microsoft’s Dustin Campbell and Mads Torgersen talk about the future of C#. Here are some of the bullet points from the video: You can write C# in any editor you want. C# is open source now C# runs on Windows, Mac, and Linux C# can be used to build Windows client apps, Windows Store apps, iOS apps, and Android aps and also used to build backend and middle-tier frameworks and libraries. C# (via Roslyn, the C# engine): Supports all IDEs and editors All the linters and analysis tools All the fixing and refactoring and code generation tools All the scripting and all the REPLs C# 7 comes with new features including tuples, record types, and pattern matching.