Posts

Showing posts from May, 2013

How can export multiple Gridview in one Excel In Asp.net.

Image
How can export multiple Gridview in one  Excel In Asp.net. It is very common to work on multiple gridview when we are working on some good project. Here I am showing how can export multiple gridview in asp.net.Because it is normal to download data for report section.so if data is organize in many gridview ,than how can we deal with it ? So here is a simple logic for doing this . Step 1 : Data Base Tables. In this article I am using two table  Profile_Detail and State_Detail. But you can use Your own tables according to your need. Step 2: Page Desgin. For page Content  I am using two gridview for displaying data from Database and a Button for export data. < div >      < asp : GridView ID ="gr1" runat ="server"         AutoGenerateColumns = "false" Font-Names = "Arial"         Font-Size = "11pt" AlternatingRowStyle-BackColor =...

Create and consume web service in asp.net

Image
Create and consume web service in asp.net Web service is used for communicating between Different application which is available on same server or  different server. It is platform independent. So here is a simple  example for this.in this I am creating a web service test  and i am define four web method . Step 1: Create Web service Go to add new item in your current web solution  and  add web service (Name it Acc to your choice).In this article I named it test.asmx. Step 2: code  on test.asmx. public class test : System.Web.Services. WebService     { //Default web Method         [ WebMethod ]         public string HelloWorld()         {             return "Hello World" ;         } //My web Method ...

Chart control in asp.net and its different type and views.

Image
Chart control in asp.net and its different type and views. In My previous Post ( Read ) ,I had bind chart control with database. Now Here I am showing different types of chart and its view(3D or 2D). Firstly design Your web page with different type of controls. Here I am using Dropdownlist,RadioButtonList,CahekBox,Chart Control and SqldataSource.   Database Table Table Structure. CREATE TABLE [dbo] . [student] (       [id] [bigint] IDENTITY ( 1 , 1 ) NOT NULL,       [student_name] [varchar] ( 50 ) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,       [average_marks] [decimal] ( 18 , 0 ) NULL ) Insert  Some values… INSERT [dbo] . [student] ( [student_name] , [average_marks] ) VALUES ( 'kandy' , CAST ( 45 AS Decimal ( 18 , 0 ))) INSERT [dbo] . [student] ( [student_name] , [average_marks] ) VALUES ( 'Sam' , CAST ( 23 AS Decimal ( 18 , ...

How can use Chart controls in Asp.net using c#

Image
Chart controls in Asp.net using c# Here I am using asp.net chart control for preparing reports section attractive and best understandable. It is very easy to any type of user understand a graphical representation very easily than a raw data. So here I am writing this article for binding chart control with database table data. Firstly if u don’t have chart control in your toolbox list, then u can download it from this link… http://www.microsoft.com/en-us/download/details.aspx?id=14422 Database Table Table Structure. CREATE TABLE [dbo] . [student] (       [id] [bigint] IDENTITY ( 1 , 1 ) NOT NULL,       [student_name] [varchar] ( 50 ) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,       [average_marks] [decimal] ( 18 , 0 ) NULL )   Insert  Some values… INSERT [dbo] . [student] ( [student_name] , [average_marks] ) VALUES ( 'kandy' , CAST ( 45 AS Deci...