0
正如您所看到的,我在ItemTemplate中有TextBox。我想要做的是:我想在default.aspx.cs中的數據庫代碼中使用TxtUrunID,但我找不到TxtUrunID。我能做什麼?我無法使用/調用aspx.cs中的項目模板中的文本框
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<li class="<%#Eval("urunkategoriadi") %>">
<figure>
<div class="gallery-img"><asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"><img src="<%#Eval("urunresmi") %>" alt="" /></asp:LinkButton></div>
<figcaption>
<asp:TextBox ID="TxtUrunID" runat="server" CssClass="form-control" Text='<%#Eval("urunid") %>' Visible="false"></asp:TextBox>
<h3><%#Eval("urunadi") %></h3>
<p>Ürün hakkında detaylı bilgi için tıklayınız.</p>
</figcaption>
</figure>
</li>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:aytasarimConnectionString %>" SelectCommand="SELECT [urunid], [urunadi], [urunkategoriadi], [urunresmi] FROM [urun]"></asp:SqlDataSource>
default.aspx.cs page and my SQL code (SELECT code) is here:
謝謝先生。這是工作。 – Shadouspan