title: How to use an ajax modal popup and consume a value from a link?
body: <p>I've read a few articles regarding getting values back from a modal popup in an ASP .NET page, but they all seem to use JavaScript to accomplish this which isn't really want I want to do if possible.</p>
  
  <p>I have a web user control which has a repeater that I populate from a list into a table. Each row has a link button which has a redirect url with a value as a query string.</p>
  
  <p>Then I have another web user control which is just a link button with a panel and the repeater web user control that once clicked shows the actual modal popup.</p>
  
  <p>Is it possible to get a value from the web user control once the link button on the repeater is clicked without having to redirect to the same page? I basically want to click on the link, show the modal and once closed, want to access the value.</p>
  
  <p>I'm populating the repeater with the links as follows:</p>
  
  <pre><code>        string linkUrl = "";
          string action = "";
          if (Request.QueryString["action"] != null)
          {
              action = Request.QueryString["action"];
              switch (action)
              {
                  case "SetupCompany":
                      {
                          linkUrl = "&lt;a href=CreateCompanies.aspx?companyId=";
                          break;
                      }
                  case "ViewCompany":
                      {
                          linkUrl = "&lt;a href=ViewCompany.aspx?companyId=";
                          break;
                      }
              }
          }
          CompaniesBusinessManager mgr = new CompaniesBusinessManager();
          var companies = mgr.GetCompanies(txtCompanyName.Text, txtRegistrationNumber.Text);
          if (linkUrl != "")
          {
              foreach (var c in companies)
              {
                  c.Name = linkUrl + c.Id.ToString() + "&amp;action=" + action + "&gt;" + c.Name + "&lt;/a&gt;";
  
              }
          }
          rptrCompanies.DataSource = companies;
          rptrCompanies.DataBind();
  </code></pre>