popup on gridview link button
<p><strong>this is aspx page code</strong></p>


    

        

    
    
        
            
                
                    

' OnClick="lnkCustomer">





                    
                    
                    
                    
                    
                    
                
            

            
            
            

            




        
    
    " 
        SelectCommand="SELECT DISTINCT [firstname], [middlename], [lastname], [mobile], [city], [title], [enquirymasterid] FROM [EnquiryMaster]">
    
    

<p>*<em>I have written this code behind link button in gridview but the  popup doesnt sho</em>*w</p>

<pre><code>protected void lnkCustomer(object sender, EventArgs e)
   {
       //Retrieve Customer ID
       LinkButton lnkCustomerID = sender as LinkButton;
       string strCustomerID = lnkCustomerID.Text;

       //Create sql connection and fetch data from database based on CustomerID
       string strConnectionString = ConfigurationManager.ConnectionStrings["connstring"].ConnectionString;
       string strSelect = "SELECT DISTINCT [firstname], [middlename], [lastname], [mobile], [city], [title], [enquirymasterid] FROM [EnquiryMaster] WHERE enquirymasterid = @enquirymasterid";
       SqlConnection sqlCon = new SqlConnection();
       sqlCon.ConnectionString = strConnectionString;
       SqlCommand cmdCustomerDetails = new SqlCommand();        
            cmdCustomerDetails.Connection = sqlCon;
        cmdCustomerDetails.CommandType = System.Data.CommandType.Text;
        cmdCustomerDetails.CommandText = strSelect;
        cmdCustomerDetails.Parameters.AddWithValue("@enquirymasterid", strCustomerID);
       sqlCon.Open();

       //Create DataReader to read the record
        SqlDataReader dReader = cmdCustomerDetails.ExecuteReader();
       GridView2.DataSource = dReader;
        GridView2.DataBind();
        sqlCon.Close();
        modalPopUpExtender1.Show();
}
</code></pre>
