Total Pageviews

15 October 2018

All HTML Versions

All HTML Versions


Since the early days of the web, there have been many versions of HTML:
his specification defines the 5th major version, second minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML)



Version Year


HTML
1991
HTML 2.0
1995

HTML 3.2
1997
HTML 4.01
1999
XHTML
2000
HTML5
2014


HTML Page Structure



HTML Page Structure

Below is a visualization of an HTML page structure:

<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

 <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correct way.It must only appear once, at the top of the page (before any HTML tags).The <!DOCTYPE> declaration is not case sensitive.The <!DOCTYPE> declaration for HTML5 is:

For Example
<!DOCTYPE html>

HTML Tags

HTML Tags


HTML tags are element names surrounded by angle brackets: following tags are given as below-


<P>
</P>
Paragraph
<H1>
</H1>
Heading
<br>
</br>
Break
<b>
</b>
Bold
<marquee>
</marquee>
Movement
<body>
</body>
Body content
etc.
etc..
……………………

Here we are using above tags paragraph ,heading,break bold movement tags are used

For example

<!DOCTYPE html>

<html>

<head>

<title>Page Title</title>

</head>

<body>

 <Marquee>My First Web Page <Marquee>

<h1>My First Heading</h1>

<p>My first paragraph.</p>



</body>


</html>



Introduction of HTML (HYPERTEXT MARKUP LANGUAGE)


Introduction of HTML (HYPERTEXT MARKUP LANGUAGE)
OR
What Is HTML

HTML is the standard markup language for creating Web pages .With help of html create a website and use images to display in web site.HTML tag represent  user information like to display about all information in different-different domain such as IT,Medical,Manufacturing….etc.
  1.        There are following points in HTML given as below-
  2.        HTML stands for Hyper Text Markup Language
  3.        It describes the structure of Web pages using markup
  4.        Elements are the building blocks of HTML pages
  5.        Elements are represented by tags
  6.        HTML tags label pieces of content such as "heading", "paragraph", "table", and so on


For Example-
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>


In the above following Tags are uses and description given as-
The <!DOCTYPE html> declaration  document type in  HTML5
The <html>  is the root element
The <head> contains Meta information
The <title> specifies a title for the document
The <body> contains the visible page content
The <h1> element defines a large heading
The <p> element defines a paragraph





18 April 2018

What is view? what is advantage and Disadvantage of view?

What is view? what is advantage and Disadvantage of view? 


View just like a virtual table which contains data view simply and query retrieve data dynamically.
in view data show from table in virtual way just like image and data changes when in table data
will be change in view we can not insert, update and delete records dynamically.

Material view is also available in which update records a specific time interval.


Advantage of view

1.View does not store data in physical location.
2.View hide some column from the table.
3.Access restriction since data insert Update and deletion not possible.


Disadvantage of View

1.When table dropped associated view became irrelevant.
2.During view show the data process is very slow.
3. View take large memory.

17 April 2018

What is caching ?

What is caching and types of caching

This is technique use to increase performance by keeping access data in fast way.The request for a
cached file or data from the actual location

There are three kind of caching

1.Output Caching

 Response.Cache.SetExpires(DateTime.Now.AddMonths(1));
    Response.Cache.SetCacheability(
        HttpCacheability.ServerAndPrivate);
    Response.Cache.SetValidUntilExpires(true);

2.Fragment Caching


Create a user control


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="amrit.ascx.cs" Inherits="WebUserControl" %>
<%@ OutputCache Duration="5" VaryByParam="None" %>

<asp:Label ID="lblTime" runat="server" Font-Bold="true" ForeColor="Blue" />


create a page and define datetime on load event

protected void Page_Load(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString();
}



<%@ Register src="amrit.ascx" tagname="WebUserControl" tagprefix="uc1" %>
<!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>Fragment Caching in Asp.Net with Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Refresh the Page Time Will Update Only After Every 5 Seconds</p>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
</div>
</form>
</body>
</html>

3.Data Caching

 Cache.Remove(String key);

What are the different type of validators in asp.net

Different Type of Validators ?

There are following types of validators in asp.net are given as below-

1.Required Field Validator
2.Range Validator
3.Compare Validator
4.Custom Validator
5.Regular Expression Validator
6.Summary Validator



1.Required Field Validator

In required validator use for input type of text compulsory to fill otherwise show error.

for example

<form id="form1" runat="server">
    Your name:<br />
    <asp:TextBox runat="server" id="t1" />
    <asp:RequiredFieldValidator runat="server" id="reqName" controltovalidate="t1" errormessage="Please enter your name!" />
    <br /><br />
    <asp:Button runat="server" id="btnSubmitForm" text="ok" />
</form>

2.Range Validator

In range validator define specific range to give the value in text box.
For Example

Date:<br />
<asp:TextBox runat="server" id="txtDate" />
<asp:RangeValidator runat="server" id="rngDate" controltovalidate="txtDate" type="Date" minimumvalue="01-01-2006" maximumvalue="31-12-2006" errormessage="Please enter a valid date within 2006!" />

<br /><br />


3.Compare Validator

In compare validator compare two textbox value.It just like a required field validator.
For example if one textbox contain 2 value and other contain 3 value

Small number:<br />
<asp:TextBox runat="server" id="txtSmallNumber" /><br /><br />
Big number:<br />
<asp:TextBox runat="server" id="txtBigNumber" /><br />
<asp:CompareValidator runat="server" id="cmpNumbers" controltovalidate="txtSmallNumber" controltocompare="txtBigNumber" operator="LessThan" type="Integer" errormessage="The first number should be smaller than the second number!" /><br />


4.Custom Validator

According to requirement create a custom validation which is validate by server side.


Custom text:<br />
<asp:TextBox runat="server" id="txtCustom" />
<asp:CustomValidator runat="server" id="cusCustom" controltovalidate="txtCustom" onservervalidate="cusCustom_ServerValidate" errormessage="The text must be exactly 8 characters long!" />
<br /><br />

Server side create a validation

protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
    if(e.Value.Length == 8)
        e.IsValid = true;
    else
        e.IsValid = false;
}

5.Regular Expression

In regular expression contain expression code to check textbox value by the validation expression
for example
we define only integer value 1 to 4 digit.


digit number:<br />
<asp:TextBox runat="server" id="txtNumber" />
<asp:RegularExpressionValidator runat="server" id="rexNumber" controltovalidate="txtNumber" validationexpression="^[0-9]{4}$" errormessage="Please enter a 4 digit number!" />
<br /><br />

6.Summary of Validator
Summary of validation is allow to display all error when click submit button.


For example
<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Button_Submit_Click(object sender, System.EventArgs e)
    {
        Label_Message.Text = "Your submitted info....<br />" +
            "Name : " +
            TextBox_FirstName.Text.ToString() + " " +
            TextBox_LastName.Text.ToString() +
            "<br />City: " +
            TextBox_City.Text.ToString();
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to use ValidationSummary control in asp.net</title>
</head>
<body style="padding:25px">
    <form id="form1" runat="server">
    <div>
        <h2 style="color:MidnightBlue; font-style:italic;">     
            How to use ValidationSummary control
        </h2>     
        <hr width="450" align="left" color="Gainsboro" />
        <asp:Label
            ID="Label_Message"
            runat="server"
            Font-Bold="true"
            Font-Names="Comic Sans MS"
            ForeColor="OliveDrab"
            Font-Italic="true"
            Font-Size="X-Large"
            />
        <asp:ValidationSummary
            ID="ValidationSummary1"
            runat="server"
            HeaderText="Following error occurs....."
            ShowMessageBox="false"
            DisplayMode="BulletList"
            ShowSummary="true"
            BackColor="Snow"
            Width="450"
            ForeColor="Red"
            Font-Size="X-Large"
            Font-Italic="true"
            />
        <br /><br />
        <asp:Label
            ID="Label_FirstName"
            runat="server"
            Text="First name"
            AssociatedControlID="TextBox_FirstName"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_FirstName"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator1"
             runat="server"
             ControlToValidate="TextBox_FirstName"
             ErrorMessage='Input your first name.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />

        <asp:Label
            ID="Label_LastName"
            runat="server"
            Text="Last name"
            AssociatedControlID="TextBox_LastName"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_LastName"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator2"
             runat="server"
             ControlToValidate="TextBox_LastName"
             ErrorMessage='Input your last name.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />
       
        <asp:Label
            ID="Label_City"
            runat="server"
            Text="City"
            AssociatedControlID="TextBox_City"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_City"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator3"
             runat="server"
             ControlToValidate="TextBox_City"
             ErrorMessage='Input your city.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />
        <asp:Button
            ID="Button_Submit"
            runat="server"
            Text="Submit"
            OnClick="Button_Submit_Click"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="DodgerBlue"
            Font-Names="Monaco"
            Height="45"
            Width="350"
            />
        <br /><br />
    </div>
    </form>
</body>
</html>

I hope my post is usefull for you............


12 February 2018

Home

The main motive of .net learning point is to provide the information to all new comers working on dot Net framework. Those students or Fresher’s who are willing to learn .net programming language and its oops concepts can get better information and working trips and tricks with the help of advance technology these are C# , SQL Server 2008, ASP.net, ADO.Net, Crystal Report, WCF ,WPF , Silver light, AJAX, CSS, Java script etc.

Here i will disscuss article about the Introduction Of .Net Frame Work 4.0.and others version which comes one by one according technology brifly reprented as below.Hope this article help full for you....


Asp.Net Page Life Cycle structure:-


The .NET Framework (pronounced dot net) is a software Framework developed by Microsoft that runs primarily on Microsoft Windows It includes a large librarary and provides language interoperability across several programming languages. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Runtime (CLR), an application virtual machine that provides important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.

The .NET Framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces a popular integrated development environment largely for .NET software called Visual Studio.


Privacy Policy

My Name Amrit Yadav We operates  https://ambrosia-amrit.blogspot.in/. This page informs you of our policies regarding the collection, use and disclosure of Personal Information we receive from users of the Site.


We use your Personal Information only for providing and improving the Site. By using the Site, you agree to the collection and use of information in accordance with this policy.

Information Collection And Use

While using our Site, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to your name ("Personal Information").

Log Data

Like many site operators, we collect information that your browser sends whenever you visit our Site ("Log Data").

This Log Data may include information such as your computer's Internet Protocol ("IP") address, browser type, browser version, the pages of our Site that you visit, the time and date of your visit, the time spent on those pages and other statistics.

In addition, we may use third party services such as Google Analytics that collect, monitor and analyze this …

The Log Data section is for businesses that use analytics or tracking services in websites or apps, like Google Analytics. For the full disclosure section.

Communications

We may use your Personal Information to contact you with newsletters, marketing or promotional materials and other information that ...

The Communications section is for businesses that may contact users via email (email newsletters) or other methods. For the full disclosure section.

Cookies

Cookies are files with small amount of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and stored on your computer's hard drive.

Like many sites, we use "cookies" to collect information. You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Site.

Security

The security of your Personal Information is important to us, but remembers that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security.

Changes to This Privacy Policy

This Privacy Policy is effective as of (12-02-2018) and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.

We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy.

If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website.



5 October 2016

Edit update and delete by using store procedure and pass parameters in c#

In this blogger we discuss about functions can have only input parameters allow giving parameters for it, whereas procedures can have I/O parameters. Here functions can be called from procedure for edit and update details by using different-different parameters, whereas procedures cannot be called from function. Procedure allows SELECT as well as DML (INSERT/UPDATE/DELETE).


1-First of all creating table emp_details by using script


USE [mydb]
GO

/****** Object:  Table [dbo].[emp_details]    Script Date: 10/06/2016 11:06:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[emp_details](
    [emp_id] [int] IDENTITY(1,1) NOT NULL,
    [emp_name] [varchar](50) NULL,
    [emp_address] [varchar](50) NULL,
    [emp_salary] [int] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


2-Creating procedure emp_details by using script

GO
/****** Object:  StoredProcedure [dbo].[procemp_details]    Script Date: 10/06/2016 10:20:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[procemp_details]
      @Action VARCHAR(10)
      ,@emp_id INT = NULL
      ,@emp_name VARCHAR(50) = NULL
      ,@emp_address VARCHAR(50) = NULL
      ,@emp_salary INT=NULL
AS
BEGIN
      SET NOCOUNT ON;

      --SELECT
    IF @Action = 'SELECT'
      BEGIN
            SELECT emp_id, emp_name,emp_address, emp_salary
            FROM emp_deatails
      END

      --INSERT
    IF @Action = 'INSERT'
      BEGIN
            INSERT INTO emp_deatails(emp_name,emp_address,emp_salary)
            VALUES (@emp_name,@emp_address,@emp_salary)
      END

      --UPDATE
    IF @Action = 'UPDATE'
      BEGIN
            UPDATE emp_deatails
            SET emp_name =@emp_name, emp_address =@emp_address,emp_salary=@emp_salary
            WHERE emp_id =@emp_id
      END

      --DELETE
    IF @Action = 'DELETE'
      BEGIN
            DELETE FROM emp_deatails
            WHERE emp_id =@emp_id
      END
END


3-Create design page of grid view

Default2.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="grd_details" runat="server"  AutoGenerateColumns="false" DataKeyNames="emp_id" OnRowDataBound="OnRowDataBound" OnRowEditing="OnRowEditing" OnRowCancelingEdit="OnRowCancelingEdit" OnRowUpdating="OnRowUpdating" OnRowDeleting="OnRowDeleting"  EmptyDataText="No records has been added.">
    <Columns>
    <asp:TemplateField HeaderText="Name" ItemStyle-Width="150">
    <ItemTemplate>
    <asp:Label ID="lblname" runat="server" Text='<%#Eval("emp_name") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtname" runat="server" Text='<%#Eval("emp_name") %>'></asp:TextBox>
    </EditItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Address" ItemStyle-Width="150">
    <ItemTemplate>
    <asp:Label ID="lbladdress" runat="server" Text='<%#Eval("emp_address") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtaddress" runat="server" Text='<%#Eval("emp_address") %>'></asp:TextBox>
    </EditItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Salary" ItemStyle-Width="150">
    <ItemTemplate>
    <asp:Label ID="lblsalary" runat="server" Text='<%#Eval("emp_salary") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtsalary" runat="server" Text='<%#Eval("emp_salary") %>'></asp:TextBox>
    </EditItemTemplate>
    </asp:TemplateField>
    <asp:CommandField ButtonType="Button" ShowEditButton="true" ShowDeleteButton="true"  ItemStyle-Width="150" />
    </Columns>
   
    </asp:GridView>
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
<tr>
    <td style="width: 150px">
        Name:<br />
        <asp:TextBox ID="txtName" runat="server" Width="140" />
    </td>
    <td style="width: 150px">
        Country:<br />
        <asp:TextBox ID="txtCountry" runat="server" Width="140" />
    </td>
    <td style="width: 150px">
        Salary:<br />
        <asp:TextBox ID="txtsalary" runat="server" Width="140" />
    </td>
    <td style="width: 100px">
        <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="Insert" />
    </td>
    <td><asp:Label ID="lbl" runat="server"></asp:Label></td>
</tr>
</table>
    </div>
    </form>
</body>
</html>

Default2.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
    String s = ConfigurationManager.ConnectionStrings["conn"].ToString();
    SqlConnection con;
    SqlCommand cmd;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            this.grd_details1();
        }
    }

    private void grd_details1()
    {
        con = new SqlConnection(s);
        cmd = new SqlCommand("procemp_details");
           cmd.Parameters.AddWithValue("@Action", "SELECT");
       
             cmd.CommandType = CommandType.StoredProcedure;
              SqlDataAdapter sda = new SqlDataAdapter(cmd);
              cmd.Connection = con;
              sda.SelectCommand = cmd;
                 DataTable dt = new DataTable();
                    sda.Fill(dt);
                    grd_details.DataSource = dt;
                    grd_details.DataBind();
        
    }
    protected void Insert(object sender, EventArgs e)
    {
        string name = txtName.Text;
        string country = txtCountry.Text;
        string salary=txtsalary.Text;
        con = new SqlConnection(s);
        cmd = new SqlCommand("procemp_details");
        cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Action", "INSERT");
                cmd.Parameters.AddWithValue("@emp_name", name);
                cmd.Parameters.AddWithValue("@emp_address", country);
                cmd.Parameters.AddWithValue("@emp_salary", salary);
                cmd.Connection = con;
                con.Open();
           cmd.ExecuteNonQuery();
                con.Close();
                lbl.Visible = true;
                lbl.Text = "Records are Submitted Successfully";
               this.grd_details1();
    }
    protected void OnRowEditing(object sender, GridViewEditEventArgs e)
    {
        grd_details.EditIndex = e.NewEditIndex;
        this.grd_details1();
    }

    protected void OnRowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        GridViewRow row = grd_details.Rows[e.RowIndex];
        int emp_id = Convert.ToInt32(grd_details.DataKeys[e.RowIndex].Values[0]);
        string emp_name = (row.FindControl("txtName") as TextBox).Text;
        string emp_address = (row.FindControl("txtaddress") as TextBox).Text;
        string emp_salary = (row.FindControl("txtsalary") as TextBox).Text;
                con = new SqlConnection(s);
                SqlCommand cmd = new SqlCommand("procemp_details");
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Action", "UPDATE");
                cmd.Parameters.AddWithValue("@emp_id", emp_id);
                cmd.Parameters.AddWithValue("@emp_name", emp_name);
                cmd.Parameters.AddWithValue("@emp_address", emp_address);
                cmd.Parameters.AddWithValue("@emp_salary",emp_salary);
                cmd.Connection = con;
                con.Open();
               cmd.ExecuteNonQuery();
               lbl.Visible = true;
               lbl.Text = "Records are updated Successfully";
                con.Close();
                
        grd_details.EditIndex = -1;
        this.grd_details1();
}
    protected void OnRowCancelingEdit(object sender, EventArgs e)
    {
        grd_details.EditIndex = -1;
        this.grd_details1();
    }

    protected void OnRowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int emp_id = Convert.ToInt32(grd_details.DataKeys[e.RowIndex].Values[0]);
           con = new SqlConnection(s);
           SqlCommand cmd = new SqlCommand("procemp_details");
               cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Action", "DELETE");
                cmd.Parameters.AddWithValue("@emp_id", emp_id);
                cmd.Connection = con;
                con.Open();
                cmd.ExecuteNonQuery();
                lbl.Visible = true;
                lbl.Text = "Records are Deleted Successfully";
                con.Close();
                this.grd_details1();
    }
    protected void OnRowDataBound(object sender, GridViewRowEventArgs e)
    {
       
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string item = e.Row.Cells[0].Text;
            foreach (Button button in e.Row.Cells[3].Controls.OfType<Button>())
            {
                if (button.CommandName == "Delete")
                {
                    button.Attributes["onclick"] = "if(!confirm('Do you want to delete " + item + "?')){ return false; };";
                }
            }
        }
    }
}

In the view of above articles helps all of you.Let me know if any query..........

Contact Form

Name

Email *

Message *