title: Getting Info out of a custom control with jQuery. Visual Studio 2010
body: <p>I am learning Web Applications development with Microsoft .NET Framework 4. While I am going through the book, I have a side project at work that I am coding while I learn this stuff.</p>
  
  <p>It is a real simple application that, based on a username, it will query a database, dynamically create custom controls based on the number of rows from the database. </p>
  
  <p>The custom control is nothing more than a image and a label. It does however have some member variables: reportName and filePath. </p>
  
  <pre><code>public partial class ReportIcon : System.Web.UI.UserControl
  {
      public string reportName { get; set; }
      public string filePath { get; set; }
  
      protected void Page_Load(object sender, EventArgs e)
      {
          ReportNameLabel.Text = this.reportName;
      }
  }
  </code></pre>
  
  <p>These dynamically created icons are created just fine and the member variables are set according to the database values.</p>
  
  <p>I am trying to retrieve the filePath value using jQuery's onClick event. I can't seem to be able to get to that information. Right now I just have it alerting that the icon was indeed clicked.</p>
  
  <pre><code>$('.report-icons').click(
      function () {
          $(this).siblings().removeClass("selected");
          $(this).addClass("selected");
          alert("Get PDF File");
      }
  
  );
  </code></pre>
  
  <p>Can someone point me in the right direction to get to this information in the custom control using jQuery?</p>
  
  <p>Thanks</p>