转发器Asp.net按钮Onclick调用C#方法?

时间:2014-11-23 09:41:21

标签: c# asp.net repeater

我有asp.net Repeater,使用插入数据库重复3个控件 textbox名称textbox代码 和button使用实体模型将其插入数据库 我有如何用每个项目调用它的方法?

  <asp:Repeater ID="Repeater1" runat="server">
    <ItemTemplate >
         <div>
             <div    id="outer" style=" background-color:lightblue  "><center><%# Eval("LangaugeName")%> </center></div> 
              <div    id="LangId" style="display :none  "><center><%# Eval("LangId")%> </center></div> 
             <br />
             <br />
    <div class="text-center">
        <strong>Zone Name&nbsp;&nbsp; </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input id="TxtZoneName" style="width: 295px" type="text" runat ="server" />
    </div>
    <div ><br /></div>
    <div class="text-center">
        <strong>Zone Code&nbsp;&nbsp; </strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input id="txtZoneCode" style="width: 295px" type="text" runat ="server"  />

</div>
   <div class="text-center">
        <br />
       &nbsp;<asp:Button ID="Button2" runat="server" Text="Add" style=" background-color :azure   " />
        <br />
        <br />
   </div>

</div>
    </ItemTemplate>
</asp:Repeater>

0 个答案:

没有答案