Monday, June 25, 2018
ROW_NUMBER() OVER Dynamic @sortExpression
Step 1: Create Table
CREATE TABLE [dbo].[Student](
[ID] [int] NULL,
[Name] [varchar](50) NULL,
[City] [varchar](50) NULL
) ON [PRIMARY]
GO
Step 2: Insert Records in the table
insert into Student values (1,'Jack','california')
insert into Student values(2,'Lira','texas')
insert into Student values(3,'Aron','sweden')
ID Name City
1 Jack california
3 Aron sweden
2 Lira ...
5:44 AM by Dilip kakadiya · 0
How to run angular app
Introduction
ASP.NET Core + Angular in VS2017
Installation
Archistructure
Demo Project
Angular Core Concepts
Building SPAs with Components
What is a Component?
Your app is a tree of Component
Overview of ASP.NET Core + Angular in VS2017
What is ASP.NET Core. ASP.NET Core is an open source and cloud-optimized...
5:07 AM by Dilip kakadiya · 0
Find and Remove Duplicate Rows from a SQL Server Table
Delete Record from table without creating Temp table.
Step 1: Create Table
CREATE TABLE [dbo].[Student](
[ID] [int] NULL,
[Name] [varchar](50) NULL,
[City] [varchar](50) NULL
) ON [PRIMARY]
GO
Step 2: Insert Records in the table
insert into Student values (1,'Jack','california')
insert into Student values(1,'Jack','california')
insert into Student values(1,'Jack','california')
insert into Student values(2,'Lira','texas')
insert...
12:14 AM by Dilip kakadiya · 0
How to Create alphanumeric sequence in sql
To create an alphanumeric sequence like this:
AAAA0000
AAAA0001
AAAA0002
AAAA0003
.
.
.
AAAA9999
AAAB0000
AAAB0001
.
.
.
ZZZZ9999
spAlphaNumericIDGeneration will return next alphanumeric number.
tblItinerary : table Name
TagName : fileld Name
CREATE PROCEDURE spAlphaNumericIDGeneration
AS
declare
@alphabet varchar(4),
@number int,
@alphanumeric varchar(6),
@strNumber...
12:00 AM by Dilip kakadiya · 0
Sunday, June 24, 2018
How we can call a JavaScript function on the change of a Dropdown List in MVC?
Create a JavaScript method:
function DrpIndexChanged() { }
Invoke the method:
<%:Html.DropDownListFor(x => x.SelectedProduct, new SelectList(Model.Customers, “Value”, “Text”), “Please Select a Customer”, new { id = “ddlCustomers”, onchange=” DrpIndexChanged ()” })%>
createSummaryAndThumb("summary2122628552512127688"...
10:48 PM by Dilip kakadiya · 0
How to change the action name in MVC?
“ActionName” attribute can be used for changing the action name. Below is the sample code snippet to demonstrate more –
[ActionName(“TestActionNew”)]
public ActionResult TestAction()
{
return View();
}
So in the above code snippet “TestAction” is the original action name and in “ActionName” attribute, name — “TestActionNew” is given. So the caller of this action method will use the name “TestActionNew” to call this a...
10:47 PM by Dilip kakadiya · 0
How to enable Attribute Routing?
Just add the method — “MapMvcAttributeRoutes()” to enable attribute routing as shown below
public static void RegistearRoutes(RouteCollection routes)
{
routes.IgnoareRoute(“{resource}.axd/{*pathInfo}”);
//enabling attribute routing
routes.MapMvcAttributeRoutes();
//convention-based routing
routes.MapRoute
(
name: “Default”,
url: “{controller}/{action}/{id}”,
defaults: new { controller = “Customer”, action = “GetCustomerList”,...
10:45 PM by Dilip kakadiya · 0
Subscribe to:
Posts (Atom)