Showing posts with label General. Show all posts
Showing posts with label General. Show all posts
Friday, 30 March 2012
Thursday, 29 March 2012
INTERESTING STORY OF A PRINCESS - GOOD ONE...
|
HEALTHY LIFE IN JAPAN
![]() |
| Healthy Living |
Japan's Okinawa Island has more than 450 people living above the age of 100,
And is known as the healthiest place on Earth.
Labels:
General
Tuesday, 27 March 2012
GRIDVIEW EDIT/UPDATE, DELETE IN ASP.NET USING C#.NET
![]() |
| Asp.Net |
![]() |
| C#.Net |
![]() |
| Gridview Edit & delete |
Download The Source Here :
GridView Editing
Here with i composed Gridview Editing and deleting in Asp.Net using C#.Net
DATABASE & TABLE :
Create The Database With the Name Gv & In That Execute The Below Query
GO
/****** Object: Table [dbo].[Registration] Script Date: 03/27/2012 23:30:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Registration](
[UID] [bigint] IDENTITY(1,1) NOT NULL,
[UserName] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PassWord] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ConfirmPassWord] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Address] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Age] [bigint] NULL,
[BloodGroup] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PhoneNo] [bigint] NULL,
[Email] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOB] [datetime] NULL,
CONSTRAINT [PK_Registration] PRIMARY KEY CLUSTERED
(
[UID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
Default.aspx :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Data Grid</title>
</head>
<body>
<form id="form1" runat="server">
<%--<div allowpaging="true" style="height: 180px">--%>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
CellPadding="3" CellSpacing="2" Height="16px"
onpageindexchanging="GridView1_PageIndexChanging"
onrowcancelingedit="GridView1_RowCancelingEdit"
onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing"
onrowupdating="GridView1_RowUpdating" Width="178px"
onselectedindexchanged="GridView1_SelectedIndexChanged">
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:TemplateField HeaderText="UID">
<ItemTemplate>
<asp:Label ID = "lbl1" runat = "server" Text = '<% #bind("UID") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label id = "lbl1" runat = "server" text = '<% #bind("UID") %>'>
</asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="UserName">
<ItemTemplate>
<asp:Label ID = "lbl2" runat = "server" Text = '<% #bind("UserName") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtusername" runat = "server" text = '<% #bind("UserName") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PassWord">
<ItemTemplate>
<asp:Label ID = "lbl3" runat = "server" Text = '<% #bind("PassWord") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtpassword" runat = "server" text = '<% #bind("PassWord") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ConfirmPassWord">
<ItemTemplate>
<asp:Label ID = "lbl4" runat = "server" Text = '<% #bind("ConfirmPassWord") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtconfirmpassword" runat = "server" text = '<% #bind("ConfirmPassWord") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemTemplate>
<asp:Label ID = "lbl5" runat = "server" Text = '<% #bind("Address") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtaddress" runat = "server" text = '<% #bind("Address") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Age">
<ItemTemplate>
<asp:Label ID = "lbl6" runat = "server" Text = '<% #bind("Age") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtage" runat = "server" text = '<% #bind("Age") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="BloodGroup">
<ItemTemplate>
<asp:Label ID = "lbl7" runat = "server" Text = '<% #bind("BloodGroup") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtbloodgroup" runat = "server" text = '<% #bind("BloodGroup") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PhoneNo">
<ItemTemplate>
<asp:Label ID = "lbl8" runat = "server" Text = '<% #bind("PhoneNo") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtphoneno" runat = "server" text = '<% #bind("PhoneNo") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
<asp:Label ID = "lbl9" runat = "server" Text = '<% #bind("Email") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtemail" runat = "server" text = '<% #bind("Email") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DOB">
<ItemTemplate>
<asp:Label ID = "lbl10" runat = "server" Text = '<% #bind("DOB") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id = "txtdob" runat = "server" text = '<% #bind("DOB") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Edit">
<ItemTemplate >
<asp:LinkButton ID ="lnk1" runat ="server" Text ="Edit" CommandName ="Edit">
</asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton ID ="lnk2" runat ="server" Text ="Update" CommandName ="Update">
</asp:LinkButton>
<asp:LinkButton ID ="lnk3" runat ="server" Text ="Cancel" CommandName ="Cancel">
</asp:LinkButton>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete">
<ItemTemplate >
<asp:LinkButton ID ="lnk4" runat="server" Text ="Delete" CommandName ="delete">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<%--</div>--%>
<br />
</form>
</body>
</html>
Default.aspx.cs :
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
using System.Text;
using System.Collections;
using System.Net;
public partial class _Default : System.Web.UI.Page
{
SqlConnection con = new SqlConnection("data source=GV\\SQLEXPRESS;initial catalog = gv;user id=sa; password=sqldata; ");
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataSet ds = new DataSet();
//int index = 0;
protected void Display()
{
con.Open();
cmd.Connection = con;
da = new SqlDataAdapter("select * from registration", con);
da.Fill(ds, "registration");
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack)
{
Display();
}
}
catch (Exception ex)
{
throw ex;
}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
try
{
GridView1.PageIndex = e.NewPageIndex;
Display();
}
catch(Exception ex)
{
throw ex;
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
{
GridViewRow r = GridView1.Rows[e.RowIndex];
Label idlbl;
idlbl = (Label)r.FindControl("lbl1");
con.Open();
cmd.Connection = con;
cmd.CommandText = "delete from registration where uid = '" + idlbl.Text + "'";
cmd.ExecuteNonQuery();
con.Close();
GridView1.EditIndex = -1;
Display();
}
catch(Exception ex)
{
throw ex;
}
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
GridViewRow r = GridView1.Rows[e.RowIndex];
TextBox UN, PWd, CPWd, Add,Age,BG,PN,Eml,Dt;
Label id;
UN = (TextBox)r.FindControl("txtUserName");
PWd = (TextBox)r.FindControl("txtPassWord");
CPWd = (TextBox)r.FindControl("txtConfirmPassWord");
Add = (TextBox)r.FindControl("txtAddress");
Age = (TextBox)r.FindControl("txtAge");
BG = (TextBox)r.FindControl("txtBloodGroup");
PN = (TextBox)r.FindControl("txtPhoneNo");
Eml = (TextBox)r.FindControl("txtemail");
Dt = (TextBox)r.FindControl("txtdob");
id = (Label)r.FindControl("lbl1");
con.Open();
cmd.Connection = con;
cmd.CommandText = "update registration set UserName = '" + UN.Text + "',PassWord = '" + PWd.Text + "',ConfirmPassWord = '" + CPWd.Text + "',Address = '" + Add.Text + "',Age = '" + Age.Text + "',BloodGroup = '" + BG.Text + "',PhoneNo = '" + PN.Text + "',email = '" + Eml.Text + "',dob = '" + Dt.Text + "' where uid = '" + id.Text + "' ";
cmd.ExecuteNonQuery();
con.Close();
GridView1.EditIndex = -1;
Display();
}
catch (Exception ex)
{
throw ex;
}
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
try
{
GridView1.EditIndex = -1;
Display();
}
catch (Exception ex)
{
throw ex;
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
GridView1.EditIndex = e.NewEditIndex;
Display();
}
catch (Exception ex)
{
throw ex;
}
}
}
Labels:
.Net,
ASP.Net,
C#.Net,
General,
SQL Server
Monday, 19 March 2012
IMAGES OF VIRAT KOHLI'S 11 ONE DAY INTERNATIONAL HUNDREDS
Also Click Here To :
IMAGES OF SACHIN TENDULKAR'S TONS OF TONS | HUNDREDS OF HUNDRED MADE BY SACHIN
tHIS dETAILS uPTO tILL tHIS dATE
IMAGES OF SACHIN TENDULKAR'S TONS OF TONS | HUNDREDS OF HUNDRED MADE BY SACHIN
![]() |
107 vs Sri Lanka, December 24, 2009, Kolkata |
![]() |
102 vs Bangladesh, January 11, 2010, Mirpur |
![]() |
118 vs Australia, October 20, 2010 in Vizag |
![]() |
100 vs Bangladesh, February 19, 2011 in Mirpur |
![]() |
105 vs New Zealand, November 28, 2010 in Guwahati |
![]() |
107 vs England, September 16, 2011 in Cardiff |
![]() |
112 vs England, October 17, 2011 in Delhi |
![]() |
117 vs West Indies, December 2, 2011 in Vizag |
![]() |
133 vs Sri Lanka, February 28, 2012 in Hobart |
![]() |
108 vs Sri Lanka, March 13, 2012 in Mirpur |
![]() |
183 vs Pakistan, March 18, 2012 in Mirpur |
tHIS dETAILS uPTO tILL tHIS dATE
1). 107 vs Sri Lanka, December 24, 2009, Kolkata
2). 102 vs Bangladesh, January 11, 2010, Mirpur
3). 118 vs Australia, October 20, 2010 in Vizag
4). 100 vs Bangladesh, February 19, 2011 in Mirpur
5). 105 vs New Zealand, November 28, 2010 in Guwahati
6). 107 vs England, September 16, 2011 in Cardiff
7). 112 vs England, October 17, 2011 in Delhi
8). 117 vs West Indies, December 2, 2011 in Vizag
9). 133 vs Sri Lanka, February 28, 2012 in Hobart
10). 108 vs Sri Lanka, March 13, 2012 in Mirpur
11). 183 vs Pakistan, March 18, 2012 in Mirpur
Labels:
General
Saturday, 17 March 2012
IMAGES OF SACHIN TENDULKAR'S TONS OF TONS | HUNDREDS OF HUNDRED MADE BY SACHIN
Also Click Here To :
IMAGES OF VIRAT KOHLI'S 11 ONE DAY INTERNATIONAL HUNDREDS
IMAGES OF VIRAT KOHLI'S 11 ONE DAY INTERNATIONAL HUNDREDS
Here I Listed Below
Sachin's Centuries Of Centuries & His Scores In Hundred
List Of Teams & Venue & Also Year
Here I Listed From The Debut Hundred Of Sachin And Till Now
![]() |
| Ton No. One : 119* vs England, Manchester 1990 |
![]() |
| Ton No. Two : 148* vs Australia, Sydney 1992 |
![]() |
| Ton No. Three: 114 vs Australia, Perth 1992 |
![]() |
| Ton No. Four : 111 vs South Africa, Johannesburg 1992 |
![]() |
| Ton No. five : 165 vs England, Chennai 1993 |
![]() |
| Ton No. six : 104* vs Sri Lanka, Colombo 1993 |
![]() |
| Ton No. seven : 142 vs Sri Lanka, Lucknow 1994 |
![]() |
| Ton No. eight : 110 vs Australia, Colombo 1994 |
![]() |
| Ton No. nine : 115 vs New Zealand, Vadodara 1994 |
![]() |
| Ton No. ten : 105 vs West Indies, Jaipur 1994 |
![]() |
| Ton No. eleven : 179 vs West Indies, Nagpur 1994 |
![]() |
| Ton No. twelve : 112* vs Sri Lanka, Sharjah 1995 |
![]() |
| Ton No. thirteen : 127* vs Kenya, Cuttack 1996 |
![]() |
| Ton No. fourteen : 137 vs Sri Lanka, Delhi 1996 |
![]() |
| Ton No. fifteen : 100 vs Pakistan, Singapore 1996 |
![]() |
| Ton No. sixteen : 118 vs Pakistan, Sharjah 1996 |
![]() |
| Ton No. seventeen : 122 vs England, Birmingham 1996 |
![]() |
| Ton No. eighteen : 177 vs England, Nottingham 1996 |
![]() |
| Ton No. nineteen : 110 vs Sri Lanka, Colombo 1996 |
![]() |
| Ton No. twenty : 114 vs South Africa, Mumbai 1996 |
![]() |
| Ton No. twenty one : 169 vs South Africa, Cape Town 1997 |
![]() |
| Ton No. twenty two : 104 vs Zimbabwe, Benoni 1997 |
![]() |
| Ton No. twenty three : 117 v New Zealand, Bangalore 1997 |
![]() |
| Ton No. twenty four : 143 vs Sri Lanka, Colombo 1997 |
![]() |
| Ton No. twenty five : 139 vs Sri Lanka, Colombo 1997 |
![]() |
| Ton No. twenty six : 148 vs Sri Lanka, Mumbai 1997 |
![]() |
| Ton No. twenty seven : 155* vs Australia, Chennai 1998 |
![]() |
| Ton No. twenty eight : 177 vs Australia, Bangalore 1998 |
![]() |
| Ton No. twenty nine : 100 vs Australia, Kanpur 1998 |
![]() |
| Ton No. thirty : 143 vs Australia, Sharjah 1998 |
![]() |
| Ton No. thirty one : 134 vs Australia, Sharjah 1998 |
![]() |
| Ton No. thirty two : 100* vs Kenya, Kolkata 1998 |
![]() |
| Ton No. thirty three : 128 vs Sri Lanka, Colombo 1998 |
![]() |
| Ton No. thirty four : 127* vs Zimbabwe, Bulawayo 1998 |
![]() |
| Ton No. thirty five : 141 vs Australia, Dhaka 1998 |
![]() |
| Ton No. thirty six : 118* vs Zimbabwe, Sharjah 1998 |
![]() |
| Ton No. thirty seven : 124* vs Zimbabwe, Sharjah 1998 |
![]() |
| Ton No. thirty eight : 113 vs New Zealand, Wellington 1998 |
![]() |
| Ton No. thirty nine : 136 vs Pakistan, Chennai 1999 |
![]() |
| Ton No. forty : 124* vs Sri Lanka, Colombo 1999 |
![]() |
| Ton No. forty one : 140* vs Kenya, Bristol 1999 |
![]() |
| Ton No. forty two : 120 vs Sri Lanka, Colombo 1999 |
![]() |
| Ton No. forty three : 126* vs New Zealand, Mohali 1999 |
![]() |
| Ton No. forty four : 217 vs New Zealand, Ahmedabad 1999 |
![]() |
| Ton No. forty five : 186* vs New Zealand, Hyderabad 1999 |
![]() |
| Ton No. forty six : 116 vs Australia, Melbourne 1999 |
![]() |
| Ton No. forty seven : 122 vs South Africa, Vadodara 2000 |
![]() |
| Ton No. forty eight : 101 vs Sri Lanka, Sharjah 2000 |
![]() |
| Ton No. forty nine : 122 vs Zimbabwe, Delhi 2000 |
![]() |
| Ton No. fifty : 201* vs Zimbabwe, Nagpur 2000 |
![]() |
| Ton No. fifty one : 146 vs Zimbabwe, Jodhpur 2000 |
![]() |
| Ton No. fifty two : 126 vs Australia, Chennai 2001 |
![]() |
| Ton No. fifty three : 139 vs Australia, Indore 2001 |
![]() |
| Ton No. fifty four : 122* vs West Indies, Harare 2001 |
![]() |
| Ton No. fifty five : 101 vs South Africa, Johannesburg 2001 |
![]() |
| Ton No. fifty six : 146 vs Kenya, Paarl 2001 |
![]() |
| Ton No. fifty seven : 155 vs South Africa, Bloemfontein 2001 |
![]() |
| Ton No. fifty eight : 103 vs England, Ahmedabad 2001 |
![]() |
| Ton No. fifty nine : 176 vs Zimbabwe, Nagpur 2002 |
![]() |
| Ton No. sixty : 117 vs West Indies, Port of Spain 2002 |
![]() |
| Ton No. sixty one : 105* vs England, Chester-le-Street 2002 |
![]() |
| Ton No. sixty two : 113 vs Sri Lanka, Bristol 2002 |
![]() |
| Ton No. sixty three : 193 vs England, Leeds 2002 |
![]() |
| Ton No. sixty four : 176 vs West Indies, Kolkata 2002 |
![]() |
| Ton No. sixty five : 152 vs Namibia, Pietermaritzburg 2003 |
![]() |
| Ton No. sixty six : 100 vs Australia, Gwalior 2003 |
![]() |
| Ton No. sixty seven : 102 vs New Zealand, Hyderabad 2003 |
![]() |
| Ton No. sixty eight : 241* vs Australia, Sydney 2004 |
![]() |
| Ton No. sixty nine : 141 vs Pakistan, Rawalpindi 2004 |
![]() |
| Ton No. seventy : 194* vs Pakistan, Multan 2004 |
![]() |
| Ton No. seventy one : 248* vs Bangladesh, Dhaka 2004 |
![]() |
| Ton No. seventy two : 123 vs Pakistan, Ahmedabad 2005 |
![]() |
| Ton No. seventy three : 109 vs Sri Lanka, Delhi 2005 |
![]() |
| Ton No. seventy four : 100 vs Pakistan, Peshawar 2006 |
![]() |
| Ton No. seventy five: 141* vs West Indies, Kuala Lumpur 2006 |
![]() |
| Ton No. seventy six: 100* vs West Indies, Vadodara 2007 |
![]() |
| Ton No. seventy seven: 101 vs Bangladesh, Chittagong 2007 |
![]() |
| Ton No. seventy eight : 122* vs Bangladesh, Dhaka 2007 |
![]() |
| Ton No. seventy nine: 154* vs Australia, Sydney 2008 |
![]() |
| Ton No. eighty: 153 vs Australia, Adelaide 2008 |
![]() |
| Ton No. eighty one : 117* vs Australia, Sydney 2008 |
![]() |
| Ton No. eighty two : 109 vs Australia, Nagpur 2008 |
![]() |
| Ton No. eighty three : 103* vs England, Chennai 2008 |
![]() |
| Ton No. eighty four : 163* vs New Zealand, Christchurch 2009 |
![]() |
| Ton No. eighty five: 160 vs New Zealand, Hamilton 2009 |
![]() |
| Ton No. eighty six: 138 vs Sri Lanka, Colombo 2009 |
![]() |
| Ton No. eighty seven : 175 vs Australia, Hyderabad 2009 |
![]() |
| Ton No. eighty eight : 100* vs Sri Lanka Ahmedabad 2009 |
![]() |
| Ton No. eighty nine : 105* vs Bangladesh, Chittagong 2010 |
![]() |
| Ton No. ninety : 143 vs Bangladesh, Dhaka 2010 |
![]() |
| Ton No. ninety one : 100 vs South Africa, Nagpur 2010 |
![]() |
| Ton No. ninety two : 106 vs South Africa, Kolkata 2010 |
![]() |
| Ton No. ninety three : 200* vs South Africa, Gwalior 2010 |
![]() |
| Ton No. ninety four : 203 vs Sri Lanka, Colombo 2010 |
![]() |
| Ton No. ninety five : 214 vs Australia, Bangalore 2010 |
![]() |
| Ton No. ninety six : 111* vs South Africa, Centurion 2010 |
![]() |
| Ton No. ninety seven : 146 vs South Africa, Cape Town 2011 |
![]() |
| Ton No. ninety eight : 120 vs England, Bangalore 2011 |
![]() |
| Ton No. ninety nine : 111 vs South Africa, Nagpur 2011 |
Labels:
General
Subscribe to:
Posts (Atom)
?
+
X
Recommended for you
Loading..
loading























































































































