Monday 1 July 2013

What is Repeater Control in Asp.Net and How to use Repeater control to bind data...?

Introduction
Here I will explain you, what is Repeater Control and nhow to use this control to bind data in Asp.Net.

Description
The Repeater control in ASP.NET is a data-bound container control that can be used to automate the display of a collection of repeated list items. These items can be bound to either of the following data sources:
  • Database Table
  • XML File
In a Repeater control, the data is rendered as DataItems that are defined using one or more templates. You can even use HTML tags such as <li>, <ul>, or <div> if required. Similar to the DataGrid, DataList, or GridView controls, the Repeater control has a DataSource property that is used to set the DataSource of this control to any ICollection, IEnumerable, or IListSource instance. Once this is set, the data from one of these types of data sources can be easily bound to the Repeater control using its DataBind() method.
However, the Repeater control by itself does not support paging or editing of data. The Repeater control is light weight and does not contain so many features as the DataGrid contains. However, it enables you to place HTML code in its templates. It is great in situations where you need to display the data quickly and format the data to be displayed easily.....[Continue]

Tuesday 25 June 2013

How to display Master-Detail Data with ModalPopup Extender and GridView

Introducton
Here I will explain how to show Master-detail data using Ajax ModalPopup Extender in GridView Using Asp.Net C#.

Description
In the earlier days , we have often used the combination of GridView and DetailView to display the Master-Details. Similarly, developers have used pop-ups to show the similar scenarios where a user clicks on a gridview row and the details are displayed in a pop-up window.

Here I am exploring the ModalPopup extender control which allows a page to display contents in a modal manner...[Continue]

Monday 24 June 2013

How to Show Images into gridview using Asp.Net C#

Introduction
Here I will explain how to retrieve images from database and shows into GridView using asp.net.

Description
In my earlier post I already explain, how to insert images into database using Asp.net C# in binary format. For more details click here. and  how to display images into GridView using HTTPhandler file.

I have an table in my database for
UserProfile, image path is stored in database table and actual images are stored in project image folder. There are two ways to display images into my gridview. One is using TemplateField and another one is using ImageField. We used both way to demonstrate you.....[Continue]

Friday 21 June 2013

How to Import data from excel to SQL database using Asp.Net C#

 Introduction
 Here I will explain how to import data into database from excel work sheet using Asp.Net.

 Description
 In my earlier post we explain, how to export data from Gridview into different document formats like excel,
 word
& pdf. For more details click here.

 There are lots of easiest ways available for import data from Excel to SQL server like
 1. Excel itself provide easy options
 2. SQL server has very easy Import/Export option
 3. SQL server has packing option
 There are lot of more methods of the same....For read more click here.

 Our requirement is to import data into SQL database from excel sheet using Asp.Net C#. For this, we use  
 OLEDB connection to read data from excel sheet in this post.
If we have excel in .xls format then we use 
 Microsoft.Jet.OLEDB.4.0
and we have .xlsx format then use Microsoft.ACE.OLEDB.12.0.....
[Continue]

Saturday 15 June 2013

How to Export GridView Data in Excel, Word & PDF format using Asp.Net

Introduction
Here I will explain how to export gridview data in Excel, Word & PDF file using Asp.Net.

Description
In my earlier post I already explain, how to bind gridview using SqlDatasource. For more details click here.

Some times we required to export our gridview data in to excel, word or pdf format. Here we see how to export gridview content in excel , word and PDF format using Asp.net C#. as we know we don't have direct feature to export griview in PDF format. So here you see that, we are using third party library ITextSharp reference. You can download dll from ITextSharp and add that dll reference in you web site.
....[Continue]

How to Reterive/Show Images in GridView From SQL server using Handler in Asp.Net

Introduction
Here I will explain how to retrieve images from database and shows into GridView using asp.net.

Description
In my earlier post I already explain, how to insert images into database using Asp.net C# in binary format. For more details click here.

Here we see how to retrieve images from database and display into gidview. As I already told you retrieving binary images from database is easy but displaying is very difficult that's why we will use HTTPHandler to solve this problem.
....[Continue]

Thursday 13 June 2013

How to Insert images into SQL Server from ASP.NET Using C#

Introduction
Here I will explain how to insert images into database using asp.net

Description:
Earlier we save images into directory folder and we save image path into database but better way is to inserting images directly into database and  retrieve them from database. Using this, the images are stored in database in binary form. So to retrieve images from database we need handler file, i will explain this later.
Here, we see how to insert images into database in binary form using Asp.Net C#.
....[Continue]