title: Get Confirm value in vb.net
body: <p>I have a hidden asp Button in a Repeater. In the VB.NET code behind I use the Rerpeater_ItemCommand to get the click event within the Repeater. There's a check if user is already recording a project. If yes and he wants to start a new one, a confirm box should appear asking "Are you sure?" How can I access the click value from confirm?</p>
  
  <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand"&gt;
          &lt;ItemTemplate&gt;
  
          &lt;div class="tile user_view user_&lt;%# Eval("employeeName") %&gt;"&gt;
          &lt;div class="tilesheight"&gt;&lt;/div&gt;
          &lt;div class="element"&gt;
  
          &lt;asp:Button ID="Button1" CssClass="hiddenbutton" runat="server" /&gt; 
  
  
              Index: 
              &lt;asp:Label ID="Label1" runat="server"
                  Text='&lt;%# Eval("index") %&gt;' /&gt;&lt;br /&gt;
              &lt;hr class="hr" /&gt;
  
              customer:
              &lt;asp:Label ID="CustomerLabel" runat="server" 
                  Text='&lt;%# Eval("customer") %&gt;' /&gt;&lt;br /&gt;
              &lt;hr class ="hr" /&gt;
              order:
              &lt;asp:Label ID="OrderNoLabel" runat="server" 
                  Text='&lt;%# Eval("orderNo") %&gt;' /&gt;&lt;br /&gt;
              &lt;asp:Label ID="DescriptionLabel" runat="server" 
                  Text='&lt;%# Eval("description") %&gt;' /&gt;&lt;br /&gt;
              &lt;hr class="hr" /&gt;
  
          &lt;/div&gt;
          &lt;/div&gt;
          &lt;/ItemTemplate&gt;
          &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>code behind:</p>
  
  <pre><code>If empRecs.Contains(projects.Item(index.Text).employeeID) Then
  
              'Catch index of recording order
              i = empRecs.IndexOf(projects.Item(index.Text).employeeID)
  
  
                  Page.ClientScript.RegisterStartupScript(Me.GetType, "confirm", "confirm('Order " &amp; empRecs(i + 2) &amp; " already recording. Would you like to start a new one?')",True)
  
                  'If users clicks ok insertData()
  
          End If
  </code></pre>
  
  <p>Other solutions are using the Click Event and a hidden field. But the problem is, I don't want the confirmbox to appear every time the button is clicked. Only when empRecs conatins an employee.</p>
  
  <p>Thanks for helping</p>