repeater

Create a Repeater control in ASP.Net

南楼画角 提交于 2020-01-11 12:03:21
问题 I'm using two drop down and bind values to that drop down. Now am adding a new button add_new. I want to create the above drop downs below when I click the add button and maintain the previous selected values. Please help me to do this. 回答1: You can achieve the desired result using Repeater control of ASP.Net. You can create any type of template as you wish, see the code below: ASPX: <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <asp:DropDownList ID="DropDownList1" runat="server

Use .Net-Repeater with jquery

混江龙づ霸主 提交于 2020-01-11 06:53:05
问题 I have a Repeater (ASP.Net). <asp:Repeater ID="rep" runat="server"> <ItemTemplate> <asp:TextBox runat="server" ID="txt"></asp:TextBox> <asp:CheckBox runat="server" ID="cb" /> </ItemTemplate> I would like to write Text in the text-box if I click on the checkbox, using jQuery. Is this possible and how. 回答1: I'd recommend simply using a CSS class and using that to identify the TextBox: <asp:Repeater ID="rep" runat="server"> <ItemTemplate> <asp:TextBox runat="server" ID="txt"></asp:TextBox> <asp

User Control Inside Repeater

耗尽温柔 提交于 2020-01-10 08:55:25
问题 I have a UserControl inside a repeater. The repeater's datasource is from SQL Server. User Control's .cs - MoviePanel.ascx.cs: public int myMovieID { get; set; } public string myMovieName { get; set; } public string myMovieDescription { get; set; } protected void Page_Load(object sender, EventArgs e) { MovieIDLbl.Text = myMovieID.ToString(); MovieNameLbl.Text = myMovieName; DescriptionLbl.Text = myMovieDescription; } ASPX Page: <asp:Repeater ID="Repeater1" DataSourceID="ListOfMoviesDS" runat=

User Control Inside Repeater

时光怂恿深爱的人放手 提交于 2020-01-10 08:54:14
问题 I have a UserControl inside a repeater. The repeater's datasource is from SQL Server. User Control's .cs - MoviePanel.ascx.cs: public int myMovieID { get; set; } public string myMovieName { get; set; } public string myMovieDescription { get; set; } protected void Page_Load(object sender, EventArgs e) { MovieIDLbl.Text = myMovieID.ToString(); MovieNameLbl.Text = myMovieName; DescriptionLbl.Text = myMovieDescription; } ASPX Page: <asp:Repeater ID="Repeater1" DataSourceID="ListOfMoviesDS" runat=

C# Repeater with a Varying Number of Rows Each Able to Return a Different String With a CheckBox/Other Method

青春壹個敷衍的年華 提交于 2020-01-07 06:39:40
问题 The Asp.net website I am creating uses a Repeater to display a list of Strings concerning duplicates or missing entries from two databases. There is another list of strings created in parallel of SQL statements with one SQL statement corresponding to the same numbered string in the Repeater list. The number of strings in the lists depends on the databases chosen and can range from zero to 100+. Question: Since the number of Repeater rows are unknown, I am trying to find some method to

Set CssClass on a label inside a Repeater, in a Template Col in a GridView

余生颓废 提交于 2020-01-06 07:19:46
问题 I have a Repeater inside a Grid View control (Telerik). <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ resources: PARTNER_LIST_GRID_CATEGORY %>" UniqueName="TemplateColumn"> <HeaderStyle CssClass="myGridHeader" /> <ItemTemplate> <asp:Repeater runat="server" ID="dlPartnerCat" OnItemDataBound="dlPartnerCat_OnItemDataBound"> <ItemTemplate> <asp:Label runat="server" ID="lblPartCat" CssClass="k-margin-l-10-desktop" Text='<%#Eval(

Is it possible to retrieve property names from a databound item?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 05:59:52
问题 I have this code-behind that checks each item in a repeater when it is databound to see if the author/date are empty (either no author/date, or the system is set to not display them) so that way I can clear out their respective labels. This is so I dont get something like "Posted By on" when there is not author and/or date specified. Here is the code: protected void Page_Load(object sender, EventArgs e) { repeater.ItemDataBound += new RepeaterItemEventHandler(repeater_ItemDataBound); } void

Dropdown list to attach to repeater that will filter gridview

爱⌒轻易说出口 提交于 2020-01-05 12:26:30
问题 This post is similar to one I have posted before about a dropdown filtering results in a gridview. Well now I need this dropdown to attach itself to a repeater that will filter results into a gridview. I have tried rptLetters.DataBind() in the code behind of the dropdown list, but that doesn't seem to be changing any of the letters at the top of the page when I click on different items in the dropdown list. The screenshot doesn't show enough of the products, but in this case it skips from G

Dropdown list to attach to repeater that will filter gridview

╄→гoц情女王★ 提交于 2020-01-05 12:25:31
问题 This post is similar to one I have posted before about a dropdown filtering results in a gridview. Well now I need this dropdown to attach itself to a repeater that will filter results into a gridview. I have tried rptLetters.DataBind() in the code behind of the dropdown list, but that doesn't seem to be changing any of the letters at the top of the page when I click on different items in the dropdown list. The screenshot doesn't show enough of the products, but in this case it skips from G

Why does my repeater keep crashing on Eval(NULL) values?

末鹿安然 提交于 2020-01-05 07:13:38
问题 <asp:Repeater ID="rptLessons" runat="server"> <ItemTemplate> <tr> <td><%#Eval("fullname")%></td> <td><%#isCompleted(Eval("totallessons"), Eval("completedlessons"), Eval("totalNumAvail"), Eval("totalNumCorrect"))%></td> <td><%#FormatPercent(Eval("totalnumcorrect") / Eval("totalNumAvail"))%> <%-- (<%#Eval("totalnumcorrect")%> / <%#Eval("totalNumAvail")%>) --%></td> <td><%#FormatPercent(Eval("completedlessons") / Eval("totallessons"))%> <%-- (<%#Eval("completedlessons")%> / <%#Eval("totallessons