Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

MVC Custom Authorize Attribute with Use of Enum

Hi All, In many of our scenario's we need to use Authorize Attribute in our MVC project. The limitation of which is just that we can't use our custom user roles. What if we intend to use custom enum to Authorize some of our Action Meth...

Delegates in C#

Delegates in C# 1) Delegate is a kind of function pointer as we have in C or C++. 2) It holds the reference to a method. 3) Reference to a method can be changed at run-time. 4) We can add or remove reference to method using += and -= ...

How to trace SQL query or SP on a page

HI Guys, Some times we want to know that what SQL operation is running on a particular page or a event, then we have to debug our code base and we get the result, but it's time taking process to debug code line by line and as well as some ...

Var vs Dynamic Keywords in C#.

Var vs Dynamic Keywords in C# 1) Introduction of these keywords var was introduced in C# 3.0. dynamic was introduced in C# 4.0. 2) Variable initialization When a variable is declared as var type then the variable i...

Editor Templates for Complex Types in Asp.net MVC

Hi Friends, This is a small article about editor templates in Asp.net MVC. What are they? Why do we need them and what are the scenarios where these editor templates can be used?. Let's find out. Editor templates are provided in asp.net...

Partial View in Asp.Net MVC with Example

Hi Friends, In this blog we'll take a look at the use of partial views in asp.net MVC. So what may be the scenarios of using a partial view in code and why is this "partial"?. Let's dive in.  What will you do if you n...

Remote Validation in Asp.Net MVC

Hi Friends Whenever we register a user in our registration form we need to check for existence of current email/user name or any unique identification property. You certainly don't want two users to be registered with same email ...

How to compose email using .net

Hello Reader's if you are new to asp.net and looking to see how email is send then this blog is helpful to you. Sending the email in asp is comparatively similar with php just you have to follow the coding syntax. <% Set myMail=Creat...

Export Databind control in PDF using iTextSharp library in VB.Net

Export Databind control in PDF using iTextSharp Some time we need to display databind control like Gridview, Label, Textbox into PDF file. here we can use iTextSharp library.Firstly we need to add iTextSharp in our project reference.  ...

Bind Gridview inside Data List view in VB.Net

Bind Gridview inside Data List view Some time we need to display content in tabular form in Data list. So we can use gridview inside in Datalist. Here we have to define the DataList_ItemDataBound event and find control of our gridview at th...

Difference between yield and return statement in C#.

return statement in C# Example to demonstrate return statement: static int SimpleReturn() { return 1; return 2; return 3; } static void Main(string[] args) { Console.WriteLine(SimpleReturn()); Console.W...

IEnumerator in C#.

IEnumerator A simple iteration over a collection is supported by IEnumerator. It is an interface and is the base interface for all enumerators.  IEnumerator performs iteration but cannot be used with foreach loop ,it is only to ...

IEnumerable in C#

IEnumerable  IEnumerable is an interface which is implemented to support the ForEach semantics of Microsoft Visual Basic. It contains GetEnumerator method therefore exposes the enumerator, which in turn performs a simple iteration over a ...

How to add assignments to Projects in SharePoint 2013 using CSOM?

In SharePoint, each project has its own tasks, assignments, team members etc. While creating projects in SharePoint we have to also create tasks, assignments, team members and custom fields. Here below is the sample code for creating assignmen...

What are New features in C# 6.0 ?

Here are some features that are available in C# 6.0 -: 1) Auto Property Initialization. 2) Use of Conditional operator to check NULL values. 3) nameof Expressions 4) String Interpolation 5) Exception filters 6) Bodied Methods ...

Send appointement request via SMTP.

If you want to send a user friendly appointment request via your SMTP server instead of boring email that we usually do then we can achieve it with the help of  very simple code. Here is code: using System; using System.Collections....

TempData Vs Session in MVC

TempData TempData provide communication between Controller action and it's corresponding view by transferring and maintaining data. The tempdata is retained not only for current request but also retained in case of redirection. A...

TempData in asp.net mvc.

TempData in asp.net mvc TempData is a dictionary object derived from TempDataDictionary. TempData provide communication between Controller action and it's corresponding view by tranfering and maintaing data. The tempdata is retained...

Built in Objects in ASP.NET

ASP stands for Active Server Pages. By using ASP built-in objects, we can get the information related to the web server, web pages in the web application etc. the built-in objects are categorized according to the information it contain. Follow...

Using Left Outer Join in LINQ

We use left outer join when we want each element of the first collection should be fetched irrespective of whether it has the related element in the second collection  or not. In LINQ, we perform left outer join by calling Defaul...

Logging using log4net

Log4net is an open source library that allows .NET applications to log information in many ways. Here we are going to see an example for logging in a file.   Few steps to follow to log in a file:   1) Add log4Net dll in the ...

Difference between Readonly and const keyword in C#.

Const keyword Const variable in C# are compile time variable i.e value is known at compile time. The assignment to const variable is only done at the time of declaration and this value of variable remain constant throughout lifetime of th...

Readonly keyword in C#

Readonly keyword Readonly: Readonly is a keyword which when used with a variable then the value of that variable can only be changed either at runtime or at the time of the instance initialization. The value is assigned to these variable whe...

ViewBag in asp.net mvc

ViewBag in asp.net mvc ViewBag is an object type which is a dynamic property of ControllerBase class. public Object ViewBag { get; } ViewBag provides communication between controller and view. ViewBag passes data...

Using transaction in Entity framework 6

When we need to perform mutiple operations on an object in database or on multiple objects, then using transaction is considered a good practice as it maintains data consistency Here is the sample code of how we can use transaction in EF ...

ViewData in Asp.Net Mvc application

ViewData in Asp.Net Mvc application ViewData is one of the property of ControllerBase class. It is described as dictionary object whichis derived from ViewDataDictionary class.Thse syntax of it is as follows:- public ViewDataDictio...

How to add Task to Projects in SharePoint 2013 using CSOM?

In SharePoint, each project has its own tasks, assignments, team members etc.While creating projects in SharePoint we have to also create its tasks, assignments, team members and custom fields. Here below is the sample code for creating tasks ...

Programmatically create Workflow Stages in SharePoint 2013 using CSOM

For creating Stages using CSOM, we have to use StageCreationInformation. 1. First of all, assign basic information to Stage. Microsoft.ProjectServer.Client.StageCreationInformation stageInfo = new Microsoft.ProjectServer.Client.StageCrea...

Programmatically create Project documents in SharePoint 2013 using C#

Each project has its own documents in SharePoint. For creating the Project documents, first of all we have to create context by passing the projectSiteUrl. 1. Create context of projectSiteUrl using Microsoft.SharePoint.Client; context =...

How to check Project web app settings using PSI in SharePoint

Whenever we create new site in SharePoint site collections its default settings is "SharePoint Permission Mode". But to create Groups, Categories, Security Templates,User Sync Settings,Delegates and so on we require "Project Permis...

Lazy Loading vs Eager Loading

Hi Team, Today I will explain Lazy Loading and Eager Loading. Firstly we will explore Eager Loading. Eager Loading is the process of loading the related data. We will use Include keyword to load the related data. Let us take an exampl...

How to resolve error "PJClientCallableException: WSSWebAlreadyExists" in SharePoint 2013

A new method is introduced in CSOM is CreateProjectSite() When we try create to create Project Site using this method, sometimes we get this error "PJClientCallableException: WSSWebAlreadyExists" which means the project site we try to ...

Boxing and Unboxing

Hi Team, Today i will explain Boxing and Unboxing in C#. C# Type system mainly divided into 3 parts:- 1. Value Type 2. Reference Type 3. Pointer Type bool,byte,char,decimal,double,float,int,long,short are the value types stru...

Appending data to a blob

Microsoft has introduced a new blob type, CloudAppendBlob for appending data to an existing azure blob. It has the method AppendFromByteArray which appends data to the tail of existing blob. We need to use CloudAppendBlob type ...

Retrieving message from an azure queue

In my previous blog, I had explained how to add a message in queue. Now here is the sample code to read the message from a queue     CloudStorageAccount storageAccount = CloudStorageAccount.Parse(RoleEnvironment.GetConfigur...

Adding a message in an Azure Queue

Azure queues are helpful in background processes. It provides reliable messaging solutions for independent asynchronous communication between components in application. Here is a sample code for adding message in a queue   //Create ...

Bind RSS Feeds to Repeater Control

Hi All, RSS feeds are the Rich Site Summary feeds, benefit users who want to receive timely updates from favorite websites or to aggregate data from many sites. Here i am using ABC News RSS feeds to get the news Update. A particular RSS feeds ...

How to create project site using rest API in SharePoint

Every project have its own SharePoint sites in which each project has its own documents, tasks,project details,Deliverables, issues and so on. For creating that sites first we have to set permissions from settings.First go to PWA Settings > C...

How to create Risks,Issues and Deliverables using CSOM in SharePoint

For creating list item, we have to use ListItemCreationInformation First we create list of Risks using Microsoft.SharePoint.Client; context = new ClientContext(projectSiteUrl); //pass your project site url context.Credentials = ...

LOGIN CONTROLS IN ASP.NET

Login controls are in-built controls which provides a user interface in ASP.NET for managing the verification of users for a website. The verification is done according to username and password. Following are the controls in login control:- ...

What is the significance of the Finalize method in .NET?

 The significance of the Finalize method in .NET In .NET the clean activity for objects i.e when they are no longer required is done by Garbage Collector. But unmanaged resources (for example: Windows API created objects, File, Database c...

Method of Page navigation in ASP.NET

Page navigation means moving from one page to another in you website.  In ASP.NET, there are different methods for navigation. These navigations are :  Client-side navigation Cross-page posting Client-side browser redirect S...

Directives in ASP.NET page

To know the Directives used in ASP.NET page, First of all, we should know what is ASP.NET directive and where it is used? So,  Directive  are the commands helps in specifying optional settings, such as registering...

Kinds of Parameters in C#

Parameters  are variables that are passed into a function which defines how something should be done. The values which are passed into the function are known as arguments.   There are five methods of passing the parameter:- ...

Covariance and Contra-variance in C#

Relation between generic type parameter and generic type definition is known as variance. Covariance and contravariance are extensions for generic type parameters for arrays, delegates and interfaces. 1.COVARIANCE-  In Covariance '...

Difference between ASP.NET Web Form and ASP.NET MVC?

Difference between ASP.NET Web Form and ASP.NET MVC? ASP.NET Web Form Views i.e web Form(aspx) is tightly coupled to logic i.e  code behind(aspx.cs).  Traditional event driven model is followed. For consistent look and feel...

Navigation methods in ASP.NET

Moving from one page to another is called navigation.   There are following techniques to navigate from one page to another:-   Hyperlink control   Response.Redirect   Server.Transfer   Server.Execute &nbs...

Link Button in asp.net

Link Button is a hyperlink style button control in asp.net which implements <a></a> anchor that uses Asp.net Post back Mechanism to post the data on server. LINK BUTTON EXAMPLE:- In this example we will have two link butt...

Properties of the GridView Control

Behavior Properties of the GridView Control AllowPaging Property sets to true/false. It is used to support the paging in gridview control. AllowSorting This property supports sorting in gridview control and...

Data Caching in ASP.NET

DATA CACHING: It is a technique that allows for storing data/information in memory for rapid access. Caching is used in case if we need the same data/information next time, it could be directly retrieved from the memory instead of being generate...
1 8 16
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: