Tuesday, March 31, 2015

Import Excel Data into GridView ASP.NET C#

Introduction:
In this article I will explain how to read and display data from a sheet of an Excel file (.xls and .xlsx) and display it in ASP.Net using C# and VB.Net.

Cover the below Concept:
1. User browses and selects an Excel Workbook (xls, xlsx).
2. Show / Hid Header row is present in Excel Sheet using radio buttons.
3. Upload the Excel file
4. Uploaded File is read by the application and displayed on the web page using GridView Control.
5. GridView has paging enabled so that user can view the records easily.

ListView Data control With DataPager ASP.NET C#

Introduction:
In this article I will explain how to display/show data in ListView control With DataPager ASP.NET C#

 HTML Markup
Here I am making use of HTML Table Layout for the ListView control. I have placed the HTML Table inside the LayoutTemplate with Table Header and then a GroupPlaceHolder and finally the Footer row with a DataPager control in it.

Export to Excel GridView Data using OpenXml in ASP.Net

Introduction:
 In this article I will explain how to Export to Excel GridView Data using OpenXml in ASP.Net.
I making use of ClosedXml library along with OpenXml as ClosedXml is a wrapper library of OpenXml and makes it easier to use.

Download DocumentFormat.OpenXml and ClosedXML Libraries
You can download the libraries using the following download locations.

Implement URL Routing in ASP.Net C# 4.0

Introduction: 
In this article I will explain how to implement URL Routing in ASP.Net Web Forms 4.0. 
URL Routing is supported in .Net 3.5 SP1 or higher frameworks, if you want to use it in Visual Studio 2008 you will need to install .Net Framework 3.5 Service Pack 1.

Adding Global.asax file
The first thing you need to do is add Global.asax file to the ASP.Net Website project using Add New Item dialog in Visual Studio.

Monday, March 30, 2015

GridView Client Side Sorting and Scrollable with Fixed Headers using jQuery in ASP.Net

Introduction:

Here I will explain to play with DIV and jQuery for GridView Sorting and Scrollable view.
I couldn’t find a better way of doing it hence did not write. Few days back I noticed that a plug in is available for jQuery that can sort HTML tables Thus I quickly tried to merge it with my Scrollable GridView and finally it works succeeded and here’s it for you an ASP.Net GridView Control with Fixed Headers and scroll functionality with Client Side sorting.

Sunday, March 29, 2015

Display Total (Sum) of GridView Columns in Footer using ASP.Net C# and VB.Net

Introduction:
Here I will explain how display Total in GridView's footer using ASP.NET. 
Total (Grand Total) in GridView Footer in ASP.Net using C# and VB.Net. The GridView has paging enabled and the sum of values of a particular column on each page will be displayed in the GridView Footer Row as Grand Total.

 The below code in your aspx page
 The HTML Markup consists of an ASP.Net GridView. The ShowFooter property is set to true so that the GridView’s Footer Row is displayed.
Paging has been enabled for the GridView and OnPageIndexChanging event handler has been assigned.

VB.NET Insert Update Delete Records with Sql server - Windows Forms

Introduction:
Here I m explain how to Add / Update / Delete the Record by using VB.NET and Sql Server in the  - Windows Forms.
  • Inserting Records
  • Updating Records
  • Deleteing Records

 Inserting Records

The following code inserts a Record into the Jobs table in Pubs sample database. Drag a button onto the form and place the following code.

Display Directory (Folder) structure using ASP.Net TreeView control in C#

Displaying Directory (Folder) structure using ASP.Net TreeView control
Introduction: 
In this article I will explain how to display (show) Directory (Folder) structure like Windows Explorer using ASP.Net TreeView control in C# .

HTML Markup

<h3>
    Vehicle Details</h3>
<hr />
<asp:TreeView ID="TreeView1" runat="server" ImageSet="XPFileExplorer" NodeIndent="15">
    <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
    <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
        NodeSpacing="0px" VerticalPadding="2px"></NodeStyle>
    <ParentNodeStyle Font-Bold="False" />
    <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
        VerticalPadding="0px" />
</asp:TreeView>

Add (Insert) Items to ASP.Net ListBox using jQuery

Introduction:
Here I will explain how to add Textbox value in  ASP.Net ListBox using JQuery
use of ASP.Net ListBox control, a TextBox and a Button.
When the Button is clicked, the jQuery click event handler is executed. Inside this event handler, first the value from the TextBox is fetched and then a HTML OPTION element is created.
The TextBox value is set to the InnerHtml and Value property of the OPTION element. Finally the OPTION element is appended to the ASP.Net ListBox control.