Skip to main content
adicionou 9 caracteres ao conteúdo
Fonte Link
<div class="col-md-6" runat="server">
     <asp:Repeater ID="rptControles" runat="server">
          <ItemTemplate>
               <div class="row">
                    <div class="col-md-12">
                         <div class="form-group">
                              <div id="formulario" class="input-group" runat="server">
                                   <asp:TextBox ID="txtURL" class="form-control" hidden='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' placeholder='<%# DataBinder.Eval(Container.DataItem, "pes_nome") %>' required="true" runat="server"></asp:TextBox>
                                   <span class="input-group-btn">
                                        <asp:Button ID="btnValidar" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' OnCommand="btnValidar_Command" CssClass="btn btn-default" runat="server" Text="Go!" CausesValidation="false" />
                                   </span>
                              </div>
                         </div>
                    </div>
               </div>
          </ItemTemplate>
     </asp:Repeater>
 </div>
<div class="col-md-6" runat="server">
     <asp:Repeater ID="rptControles" runat="server">
          <ItemTemplate>
               <div class="row">
                    <div class="col-md-12">
                         <div class="form-group">
                              <div id="formulario" class="input-group" runat="server">
                                   <asp:TextBox ID="txtURL" class="form-control" hidden='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' placeholder='<%# DataBinder.Eval(Container.DataItem, "pes_nome") %>' required="true" runat="server"></asp:TextBox>
                                   <span class="input-group-btn">
                                        <asp:Button ID="btnValidar" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' OnCommand="btnValidar_Command" CssClass="btn btn-default" runat="server" Text="Go!" />
                                   </span>
                              </div>
                         </div>
                    </div>
               </div>
          </ItemTemplate>
     </asp:Repeater>
 </div>
<div class="col-md-6" runat="server">
     <asp:Repeater ID="rptControles" runat="server">
          <ItemTemplate>
               <div class="row">
                    <div class="col-md-12">
                         <div class="form-group">
                              <div id="formulario" class="input-group" runat="server">
                                   <asp:TextBox ID="txtURL" class="form-control" hidden='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' placeholder='<%# DataBinder.Eval(Container.DataItem, "pes_nome") %>' runat="server"></asp:TextBox>
                                   <span class="input-group-btn">
                                        <asp:Button ID="btnValidar" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "pes_codigo") %>' OnCommand="btnValidar_Command" CssClass="btn btn-default" runat="server" Text="Go!" CausesValidation="false" />
                                   </span>
                              </div>
                         </div>
                    </div>
               </div>
          </ItemTemplate>
     </asp:Repeater>
 </div>
adicionou 8 caracteres ao conteúdo
Fonte Link
protected void btnValidar_Command(object sender, CommandEventArgs e)
{
    var button = (Button)sender;

    var textbox = (TextBox)button.Parent.FindControl("txtURL");

    TextBox1.Text = e.CommandArgument.ToString() + " - " + textbox.Text;
}
protected void btnValidar_Command(object sender, CommandEventArgs e)
{
    var button = (Button)sender;

    var textbox = (TextBox)button.Parent.FindControl("txtURL");

    TextBox1.Text = e.CommandArgument.ToString() + textbox.Text;
}
protected void btnValidar_Command(object sender, CommandEventArgs e)
{
    var button = (Button)sender;

    var textbox = (TextBox)button.Parent.FindControl("txtURL");

    TextBox1.Text = e.CommandArgument.ToString() + " - " + textbox.Text;
}
adicionou 733 caracteres ao conteúdo
Fonte Link

Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    populaFormulario(Convert.ToInt32(Session["codigo_evento"]));
}

populaFormulario:

public void populaFormulario(int codigoEvento)
{
    ParticipanteDB parDB = new ParticipanteDB();

    rptControles.DataSource = parDB.SelecionarParticipantes(codigoEvento).Tables[0].DefaultView;
    rptControles.DataBind();
}

btnValidar_Command:

protected void btnValidar_Command(object sender, CommandEventArgs e)
{
    var button = (Button)sender;

    var textbox = (TextBox)button.Parent.FindControl("txtURL");

    TextBox1.Text = e.CommandArgument.ToString() + textbox.Text;
}

Exemplo de retorno dos textboxes e buttons:

Exemplo de retorno dos textboxes e buttons:

Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
    populaFormulario(Convert.ToInt32(Session["codigo_evento"]));
}

populaFormulario:

public void populaFormulario(int codigoEvento)
{
    ParticipanteDB parDB = new ParticipanteDB();

    rptControles.DataSource = parDB.SelecionarParticipantes(codigoEvento).Tables[0].DefaultView;
    rptControles.DataBind();
}

btnValidar_Command:

protected void btnValidar_Command(object sender, CommandEventArgs e)
{
    var button = (Button)sender;

    var textbox = (TextBox)button.Parent.FindControl("txtURL");

    TextBox1.Text = e.CommandArgument.ToString() + textbox.Text;
}

Exemplo de retorno dos textboxes e buttons:

adicionou 1 caractere ao conteúdo
Fonte Link
Carregando
Fonte Link
Carregando