ASPSnippets.com
24 May 2018 24 May 2018 0 Comments  58 Views
ASP.Net  AJAX  jQuery  MVC  Web API
Here Mudassar Ahmed Khan has explained with an example, how to return an object of Anonymous type from Web API 2 in ASP.Net MVC Razor.

This article will illustrate how to call a Web API Controller’s Action method that returns Anonymous type object using jQuery AJAX in ASP.Net MVC Razor.
23 May 2018 23 May 2018 0 Comments  205 Views
Here Mudassar Ahmed Khan has explained with an example, how to call (consume) Web Service (ASMX) with parameters from Client Side using JavaScript in ASP.Net using C# and VB.Net.
23 May 2018 23 May 2018 0 Comments  141 Views
Here Mudassar Ahmed Khan has explained with an example, how to call (consume) Web Service (ASMX) using ScriptManager in ASP.Net using C# and VB.Net.
23 May 2018 23 May 2018 0 Comments  163 Views
Here Mudassar Ahmed Khan has explained with an example, how to fetch jQuery AutoComplete TextBox data in Key Value pairs using JSON object in ASP.Net MVC Razor.

The data from database will be fetched using Entity Framework and will be returned as JSON array with Key Value pairs will be returned to the jQuery AutoComplete plugin.

This article also illustrates, how to fetch the Key and Value of the selected AutoComplete item on Form submission in ASP.Net MVC Razor.
23 May 2018 23 May 2018 0 Comments  176 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement AutoComplete TextBox from database using jQuery in ASP.Net MVC Razor.

The jQuery AutoComplete plugin will be applied to HTML TextBox and it fetch the data from Database using AJAX and Entity Framework in ASP.Net MVC Razor.

This article also illustrates, how to fetch the selected AutoComplete item on Form submission in ASP.Net MVC Razor.
22 May 2018 22 May 2018 0 Comments  206 Views
Here Mudassar Ahmed Khan has explained with an example, how to get value of Column (Item) inside ItemDataBound event of Repeater control in ASP.Net using C# and VB.Net.

This article will illustrate how to get the value of Label control inside the ItemDataBound event of Repeater control in ASP.Net.
22 May 2018 22 May 2018 0 Comments  259 Views
Here Mudassar Ahmed Khan has explained with an example, how to render GridView with THead, TBody and TFoot tags in ASP.Net using C# and VB.Net.

By default, GridView renders as HTML Table without the THead, TBody and TFoot tags.
22 May 2018 22 May 2018 0 Comments  166 Views
Here Mudassar Ahmed Khan has explained with an example, how to use the ItemDataBound (OnItemDataBound) event of Repeater in ASP.Net using C# and VB.Net.

ItemDataBound event is triggered for each Repeater Item when it is bound to the Data row.
21 May 2018 21 May 2018 0 Comments  263 Views
Here Mudassar Ahmed Khan has explained with an example, how to read, parse and insert XML File data to SQL Server Table using Stored Procedure.

SQL Server 2005 and above versions, allow to read and parse and XML file using the XML data type and it also provide functions to parse the XML and extract its Attribute and Tag values.
21 May 2018 21 May 2018 0 Comments  201 Views
Here Mudassar Ahmed Khan has explained with an example, how to read, parse and insert XML String data to SQL Server Table using Stored Procedure.

SQL Server 2005 and above versions, allow to pass a parameter of XML data type to the Stored Procedure and provide functions to parse the XML and extract its Attribute and Tag values.
21 May 2018 21 May 2018 0 Comments  261 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform CRUD operation in WebGrid using jQuery AJAX and JSON in ASP.Net MVC Razor.

WebGrid CRUD i.e. (Select, Insert, Update and Delete) operations will be performed by calling the Controller Action methods using jQuery AJAX and JSON in ASP.Net MVC Razor.
21 May 2018 21 May 2018 0 Comments  271 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform CRUD operation using jQuery AJAX and JSON in ASP.Net MVC Razor.

CRUD i.e. (Select, Insert, Update and Delete) operations will be performed by calling the Controller Action methods using jQuery AJAX and JSON in ASP.Net MVC Razor.
17 May 2018 17 May 2018 0 Comments  411 Views
ASP.Net  AJAX  jQuery  JSON
Here Mudassar Ahmed Khan has explained with an example, how to call Server Side function without Static WebMethod using jQuery in ASP.Net using C# and VB.Net.

Whenever an AJAX call needs to be done to make call to Server Side in jQuery, one has use a Static Web Method or a Web Service Web Method.

This article will illustrate how to call the Server Side code i.e. Page Load event with JSONP (JSON with Padding) using jQuery getJSON function and CallBack functions in ASP.Net.
17 May 2018 17 May 2018 0 Comments  346 Views
Here Mudassar Ahmed Khan has explained with an example, how to call Server Side function without Static WebMethod using JavaScript in ASP.Net using C# and VB.Net.

Whenever an AJAX call needs to be done to make call to Server Side in JavaScript, one has use a Static Web Method or a Web Service Web Method.

This article will illustrate how to call the Server Side code i.e. Page Load event with JSONP (JSON with Padding) using jQuery dynamic SCRIPT Tag and CallBack functions in ASP.Net.
16 May 2018 16 May 2018 0 Comments  412 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) GridView using Session data in ASP.Net using C# and VB.Net.

The concept is to create a dynamic DataTable, save it to Session and bind it to GridView.

Later whenever a new row is added, the DataTable is fetched from Session, it is updated and then again used to bind the GridView.
15 May 2018 15 May 2018 0 Comments  385 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Current Page and Previous Page names in ASP.Net using C# and VB.Net.

This article will illustrate how to extract Current Page and Previous Page names from URL using the Request.Url and Request.UrlReferrer properties in ASP.Net.
15 May 2018 15 May 2018 0 Comments  514 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform CRUD operation (Create, Read, Update and Delete) using Web API in ASP.Net MVC Razor using Entity Framework and AngularJS.

CRUD operation in simple terms means Select, Insert, Edit, Update and Delete operations.
15 May 2018 15 May 2018 0 Comments  372 Views
Here Mudassar Ahmed Khan has explained with an example, how to call SelectedIndexChanged event of ASP.Net DropDownList using JavaScript and jQuery.

First the ASP.Net DropDownList will be referenced using JavaScript or jQuery on Client Side and then its SelectedIndexChanged event will be called by making use of the __doPostBack JavaScript function.
15 May 2018 15 May 2018 0 Comments  441 Views
Here Mudassar Ahmed Khan has explained a tutorial with example, how to use Web API with database in ASP.Net MVC Razor.

This article will illustrate how to create Action methods in Web API for performing the CRUD operations with database using Entity Framework in ASP.Net MVC Razor.
14 May 2018 14 May 2018 0 Comments  411 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) GridView Row Values to another Page using QueryString in ASP.Net using C# and VB.Net.

Passing (Sending) whole GridView row through QueryString would not be a good idea due to the following reasons.
1. QueryString is unsecure for sending data as it can be easily tampered.
2. If GridView has too many Columns then it will be a very long URL with too many QueryString values.

Hence this article will illustrate, how only the Index of the GridView row will be sent using QueryString to another Page and the remaining data will be fetched using the PreviousPage property of ASP.Net.
14 May 2018 14 May 2018 0 Comments  376 Views
Here Mudassar Ahmed Khan has explained with an example, how to add (insert) rows in DataTable using For Each loop using C# and VB.Net.

This article will illustrate how to loop through GridView rows using For Each loop and add (insert) rows to DataTable using C# and VB.Net.
14 May 2018 14 May 2018 0 Comments  381 Views
Here Mudassar Ahmed Khan has explained with an example, how to add (insert) multiple rows in GridView using DataTable data in ASP.Net using C# and VB.Net.

Below the GridView, there is a Form with TextBoxes and a Button.

When the Button is clicked, the record is first added to a DataTable and then the rows from the DataTable are added to the GridView.
14 May 2018 14 May 2018 0 Comments  306 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) GridView using ViewState data in ASP.Net using C# and VB.Net.

The concept is to create a dynamic DataTable, save it to ViewState and bind it to GridView.

Later whenever a new row is added, the DataTable is fetched from ViewState, it is updated and then again used to bind the GridView.
14 May 2018 14 May 2018 0 Comments  382 Views
Here Mudassar Ahmed Khan has explained with an example, how to insert multiple rows (records) from GridView to database in ASP.Net using C# and VB.Net.

The GridView rows will be copied to a DataTable and the DataTable will be later used for bulk inserting records to SQL Server Database using SqlBulkCopy class.
14 May 2018 14 May 2018 0 Comments  371 Views
Here Mudassar Ahmed Khan has explained with an example, how to insert multiple selected (checked) rows (records) from GridView to database in ASP.Net using C# and VB.Net.

The GridView rows will be selected using CheckBoxes and the selected rows (records) will be inserted into a DataTable which will be later used for bulk inserting records to SQL Server Database using SqlBulkCopy class.