Monday, August 1, 2022

HTML DIV button like click event ASP.NET C#

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data;

using LuminiousUtility.Util;

using System.Data.SqlClient;

using System.Web.Caching;

using Luminious.DataAcessLayer;

using System.IO;

using System.Text;


public partial class View_TrainingPartner_WelcomeTP : System.Web.UI.Page

{

    bool IsPageRefresh=true;

    protected void Page_Load(object sender, EventArgs e)

    {

 this.BatchTotal.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(this.BatchTotal, string.Empty));

        if (IsPostBack && Request["__EVENTTARGET"] == BatchTotal.UniqueID)

        {

            Lbl_Batch_Div_Status.Text = "";

            BatchTotal_Click(BatchTotal, EventArgs.Empty);

            Lbl_Batch_Div_Status.Text = "0";

        }

}

}


protected void BatchTotal_Click(object sender, EventArgs e)

    {

        GetBatchDetails(0);

    }


aspx page code

<div class="widget-thumb-wrap" id="BatchTotal" style="cursor:pointer" runat="server">


No comments:

Post a Comment