OnItemCommand is not fired ListView C#, ASP.NET

I worked in ListView. And i faced one issue with OnItemCommand. There is link button, on click this button OnItemCommand event shoud fire. But it is not working. Because there is no PostBack check in the Page_Load event. By adding IsPostBack, this issue will be resolved.

Aspx Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyListViewTest.aspx.cs" Inherits="IgroupUploader.MyListViewTest" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <asp:ListView ID="lvFile" runat="server" OnItemCommand="lvFile_ItemCommand" GroupItemCount="2" GroupPlaceholderID="groupPlaceholder">
        <LayoutTemplate>
        <table>
            <tr>
                <td runat="server" id="groupPlaceholder"></td>
            </tr>
          </table>
        </div>
        </LayoutTemplate>

        <GroupTemplate>
            <tr>
            <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
            </tr>
        </GroupTemplate>
        <GroupSeparatorTemplate>
           <tr><td style="height:23px;"></td></tr>
        </GroupSeparatorTemplate>
        <ItemTemplate>
            <td>
                <asp:LinkButton ID="LinkButton1" CommandName="Delete" runat="server" Text='<%#Eval("OriginalFileName")  %>' >LinkButton</asp:LinkButton>
              </td> 
        </ItemTemplate>
    </asp:ListView>
    </div>
    </form>
</body>
</html>

Code Behind:

 protected void Page_Load(object sender, EventArgs e)
        {
                    GetFileList();

        }

 public void GetFileList()
        {
            DataTable dtFile = new DataTable();
            DataAccessLayer ObjData = new DataAccessLayer();

            //Get all the files uploaded by the logged in user.
            dtFile = ObjData.GetAllFiles(UserHashCode, this.IsAdmin);
            //Bind it to the listview.
            lvFile.DataSource = dtFile;
            lvFile.DataBind();
        }

        protected void lvFile_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("Delete"))
            {
                
            }
            
        }

Every thing is fine in the front end. We have to add not IsPostBack in the page load:

Working Code

 protected void Page_Load(object sender, EventArgs e)
        {
                     if (!IsPostBack)
            {
                
                    GetFileList();

            }

        }

 public void GetFileList()
        {
            DataTable dtFile = new DataTable();
            DataAccessLayer ObjData = new DataAccessLayer();

            //Get all the files uploaded by the logged in user.
            dtFile = ObjData.GetAllFiles(UserHashCode, this.IsAdmin);
            //Bind it to the listview.
            lvFile.DataSource = dtFile;
            lvFile.DataBind();
        }

        protected void lvFile_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("Delete"))
            {
                
            }
            
        }

Send mail in Classic Asp

Send mail

Sub sendEmail(mailFrom, mailTo, mailSubject, mailMessage, mailServer, mailUsername, mailPassword)
Set TestMail = CreateObject("cdo.message")
TestMail.From = mailFromAddress
TestMail.To = mailToAddress
TestMail.Subject = mailSubject
TestMail.HTMLBody = mailMessage
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailServerIP
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = mailUsername
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = mailPassword
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
TestMail.Configuration.Fields.Update
TestMail.Send
Set TestMail = nothing
End Sub

Save mail in your local pickup directory.

Sub sendEmail(mailFrom, mailTo, mailSubject, mailMessage, mailServer, mailUsername, mailPassword)
Set TestMail = CreateObject("cdo.message")
TestMail.From = mailFromAddress
TestMail.To = mailToAddress
TestMail.Subject = mailSubject
TestMail.HTMLBody = mailMessage
TestMail.Configuration.Fields.Item('http://schemas.microsoft.com/cdo/configuration/sendusing') = 1
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailServerIP
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\temp\maildrop"
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = mailUsername
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = mailPassword
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
TestMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
TestMail.Configuration.Fields.Update
TestMail.Send
Set TestMail = nothing
End Sub