Posts

Using button columns in gridview

Hello Guys.! i have faced a many problem with gridview when i was fresher nd want to learn about the gridview nd faced the problem in attached the different types of buttons. today m thinking abt that problem....so we'll make a program in which we'll add a different types of buttons... m sure it'll be a very interesting program....

Export to Excel Sheet

Image
Hello Guys.\ ! Today we'll make a program that how to convert GridView data in Excel Sheet.. so......... just you have to make a GridView from your Toolbox along with a button.. nd just make it very easy code.  protected void Page_Load(object sender, EventArgs e)     {         if (!Page.IsPostBack)         {             BindData();         }     } //just make a connection with your database which table you want to use in your program.....     private void BindData()     {         string constr = @"Server=kishu-pc;Database=NORTHWIND;uid=sa; Password=pass@word1;";         string query = "SELECT ProductID, ProductName, UnitPrice FROM Products";         SqlDataAdapter da = new SqlDataAdapter(query, constr);         DataTable table = new DataTable(); ...

Formatting GridView

Image
Today i have just making a intersting thing. i made the funny view of gridview. let's start for making it ! first you have to select a grid view control from your toolbox. yup one more thing just download a northwind database. it'll be a very helpfull to you for doing any practice......  <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="YellowGreen"             BorderColor="#336699" BorderStyle="Solid" BorderWidth="1px" CellPadding="2"             Font-Names="Verdana" Font-Size="10pt" Width="60%" DataKeyNames="ProductID"             GridLines="Horizontal">      <Columns>       <asp:BoundField DataField="ProductID" HeaderText="ProductID" />       <asp:BoundField DataField="ProductName" HeaderText="ProductName" />                   ...

How to use Repeater control

Image
HI Guys ! Today ....... Use the Repeater control (sample) <%@ Page Language="C#" AutoEventWireup="true" CodeFile="repeatercontroldemo.aspx.cs"     Inherits="repeatercontroldemo" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>Untitled Page</title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">             <HeaderTemplate>                 <table width="100%">                     <tr style="background-color: Fuchsia "> ...

How to use Repeater control

Image
HI Guys ! Today ....... Use the Repeater control (sample) <%@ Page Language="C#" AutoEventWireup="true" CodeFile="repeatercontroldemo.aspx.cs"     Inherits="repeatercontroldemo" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>Untitled Page</title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">             <HeaderTemplate>                 <table width="100%">                     <tr style="background-color: Fuchsia "> ...

How to upload and Retrieve multiple Images in your File System.

Image
Hi All,      Today ........... Multiple image upload: There are some simple steps to understand this application. Step 1:  Create a new ASP.NET application. <% @   Page   Language ="C#"   AutoEventWireup ="true"   CodeFile ="Default.aspx.cs"   Inherits ="_Default"  %> <! DOCTYPE   html   PUBLIC   "-//W3C//DTD XHTML 1.1//EN"   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> < html   xmlns ="http://www.w3.org/1999/xhtml"> < head >     < title > WebForm1 </ title > </ head > < body > < form   id ="Form1"   method ="post"   runat ="server"   style ="width: 530px;">     < fieldset >     < legend > Upload Multiple Photos </ legend >     < div   id ="div1"   runat ="server">       < input   ty...