FAQ Database Discussion Community


how to create event dropdownlist in repeater ( selected changed event)

asp.net,vb.net,repeater
I want to handle dropdownlist event (selectedindexchanged) for reach item in repeater. I have each row in repeater: (textbox, textbox, dropdownlist) Based on dropdownlist value, I want to hide and show the two other textboxes How can I do it?...

Reaching repeater item: The Logic

asp.net,repeater,findcontrol,asprepeater
Here is my design page: <asp:MultiView ID="mvProducts" runat="server" ActiveViewIndex="0"> <asp:View runat="server" ID="mvProducts1"> <asp:Repeater ID="rptDiscount" runat="server"> <ItemTemplate> <div class="divProduct1"> <div class="divProductHeader"> <asp:Panel ID="pnlDiscount" runat="server" CssClass="divProductHeaderDiscount" Visible="true"> <div class="menuTextTopSpacer"></div> <asp:Label ID="lblDiscount" runat="server" Text='<%#Eval("discount")...

as.net repeater does not contain a definition for repeater

c#,asp.net,repeater
I am trying to create an asp.net table with a repeater. Here is my code for creating the table: <table class="pageViewTable" align="centre" border="1"> <tr bgcolor="green"> <th>DateTime</th> <th>Page</th> <th>Location</th> <th>IP Address</th> </tr> <asp:Repeater ID="TableRepeater" runat="server" > <ItemTemplate> <tr> <td><%#Container.DataItem("dateTime")%></td> <td><%#Container.DataItem("Page")%></td>...

Entity Framework Search Function ASP.NET Webforms

asp.net,search,frameworks,entity,repeater
I have an SQL2014 database that contains clothing products. The database is integrated in an ASP.NET webforms website using gridviews, formviews, repeaters and now the entity framework. I wish to have a simple search function on the website where users can search for the partial name of a product and...

Save Modified Repeater (Check Boxes and Text Boxes) to Database

c#,asp.net,webforms,repeater
I have a Repeater that is being bound to some basic database data returned from a query. The Repeater is being bound to the database data after a dropdownlist control's SelectedIndexChanged event fires. Once the event fires and the data is bound, the Repeater is fully populated with the bound...

Validation in repeater causes strange error

c#,asp.net,validation,repeater
I have a repeater in which i have a textbox with a regex validator. The code looks basicly like this: <asp:Repeater ID="rptr" runat="server"> <ItemTemplate> <div> <!-- controlls --> <asp:TextBox ID="tbText" runat="server" ClientIDMode = "Static" EnableViewState="true" OnTextChanged="tbText_TextChanged"></asp:TextBox> <asp:RegularExpressionValidator ID="tbTextValidation" runat="server" Text="*" ToolTip="wrong!" ControlToValidate="tbText" SetFocusOnError="false" ValidationExpression="^([a-zA-Z])$">...

Foreach bind items to Datatable with C# and JSON

c#,asp.net,json.net,repeater
DataTable dtInventory = new DataTable(); dtInventory.Columns.Add("ItemID", typeof(string)); dtInventory.Columns.Add("ItemImageUrl", typeof(string)); dtInventory.Columns.Add("ItemName", typeof(string)); dtInventory.Columns.Add("Tradeable", typeof(string)); string json = new WebClient().DownloadString("storeJSON.txt"); JToken jsonInventory = JToken.Parse(json); JObject jsonItemData = jsonInventory["StoreData"].Value<JObject>(); foreach (JProperty jItemID in jsonItemData.Properties()) { string sItemID =...

Set IDs of controls of a repeater

asp.net,repeater
I have a repeater that contains a few controls and I want to set their ID's based on the IDs from database. The datasource of the repeater is a list so basicly I want to do something like this in code behind, in repeater_ItemDataBound(): var myControl = e.Item.FindControl("controlID"); myControl.ClientIDMode =...

Access textbox within asp.net repeater

c#,asp.net,repeater,nested-repeater
I have a nested asp repeater which is displaying all my items correctly. I have another div within the ItemTemplate of each repeater which submits content to my code behind. <asp:Repeater runat="server" id="repeaterNote" OnItemDataBound="repeaterNote_ItemDataBound"> <ItemTemplate> <div id="note" class="staff"><p><%# Eval("Content") %></p><ul> <li><%# Eval("AddedDate") %></li><li>20:29</li> <li><%# Eval("AddedByName") %></li><li> <a href="#"...

Use variable from loop in code behind to populate table

c#,asp.net,datatable,repeater
This is what I have on my aspx page <thead> <tr> <th>Line#</th> <th>Item</th> <th>Quantity</th> <th>Status</th> <%-- Make this column visible only for a certain condition--%> <th>Inventory</th> <%----%> </tr> </thead> <tbody> <asp:repeater id="shoppingcartlines" runat="server"> <itemtemplate> <tr> <td><%# DataBinder.Eval(Container.DataItem,"LineNo") %></td> <td><%#...

how to change image of imagebutton by checking value gets from database in for loop ? in asp.net

c#,asp.net,repeater,imagebutton,asprepeater
I want to control the value of each row in repeater in order to change image if the value is different. My problem is that I cannot get value from repeater by trying to get of data each rows(). How can I solve it? for (int i = 0; i...

How to use Eval() data in a method within a repeater

c#,asp.net,eval,repeater
I've written a method that checks and returns the status code of a URL. Then I used a repeater to grab rows from my db. What I'm trying to figure out is how to use the data returned in the repeater in a method called within the repeater. Here's the...

ASP .NET Repeater inside Repeater

c#,asp.net,repeater
I am trying to create a child Repeater inside of a parent Repeater in an *.aspx page. I have a small problem which i can't figure out how to resolve. (I will show in the attached image) The code is bellow: <asp:Panel ID="pnlUserActionSummary" runat="server" Visible="false"> <h3><b>User Actions</b></h3> <hr/> <asp:Repeater id="UserActionDetailsRepeader"...

Add a small space between tables

css,asp.net,html5,html-table,repeater
What I want to do is add a small space between my tables. When I use <p> or <br> the space is too big. Does anyone know how to make a really small space between tables? Here's what it actually looks like versus what I want it to look like:...

Javascript Array generated by ASP Repeater not updated

javascript,asp.net,arrays,google-maps,repeater
I have a repeater to generate an array(for google map marker) in client side javascript. It works fine on first load but when I trigger a post back and bind the repeater with other data. The repeater will return the initial array value to my variable. Is there any way...

How to get ItemIndex of RepeaterItem from ImageButton-Click?

c#,asp.net,vb.net,repeater
i want to convert this vb.net code to c#: Protected Sub btnDilSil_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Dim index As Integer = CType(sender.Parent, RepeaterItem).ItemIndex End Sub i write code block below instead of the code line above but it gives error "Invalid Cast Exception", please help, thanks in...

Can OnItemCommand in Repeater redirect to a new tab?

c#,asp.net,repeater
I am trying to use the Repeater's OnItemCommand to open the aspx page in a new tab (preferably) or a new window. Can it be done with OnItemCommand? Currently, it redirects to a new aspx page just fine but I stay in the same tab. Here is my markup code:...

Repeater pulling as Null is code behind?

c#,sql,repeater
I have a repeater for Frequently asked questions on a Website that I'm trying to get separated into categories depending on which treeid it is related to. When I reference the repeater (rp_FAQ) in the code behind to check if it is null so I can pass the category id...

asp.net repeater merge columns dynamically

asp.net,merge,repeater
I have a repeater in my ASP.net page. I want to merge the columns which have same text. This should happen dynamically when I bind a datatable. I have searched a lot for this. But, without success. I doubt whether it is possible with a repeater. I would also like...

Nested Class In ASP Repeater

c#,asp.net,repeater
I have a nested class that contains order items for an order: public class Order { public int ItemID { get; set; } public int CustomerId { get; set; } ... public List<OrderItem> Items { get; set; } } public class OrderItem { public int ItemId { get; set; }...

Get Hiddenfield value inside Repeater in asp.net c#

c#,asp.net,accordion,repeater
I have a hiddenfield inside a repeater control and a button outside the repeaster control. below is the asp.code that i have. <asp:Repeater ID="rptAccordian" runat="server" OnItemDataBound="rptAccordian_ItemDataBound"> <ItemTemplate> <div class="s_panel"> <h1> <a href="#" data-content="Tool tip"><%# Eval("Name") %></a> </h1> <div> <p> <small><span style="font-family: 'Segoe UI'; font-weight: bold;">Category Objective: </span><span style="font-family: 'Segoe...

AjAX Rating Control storing and fetching from database using repeater in asp.net c# i

c#,asp.net,ajax,repeater
I got error: Specified cast is not valid. I need to repeat every user already rating star from database how to get rating from db. Here how to take rating from database. Here is the stored procedure: ALTER PROCEDURE [dbo].[sp_comments] ( @eid int ) AS BEGIN declare @sql varchar(max) SET...

Marquee from database in asp.net

c#,asp.net,repeater,marquee
First, I used marquee with repeater and it is working fine, but it shows all data at the same time. My code look like this : <marquee id="ml" style="text-align: center" width="400px" height="170" scrolldelay="5" scrollamount="5"> <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <br /> <asp:Label ID="Label1" runat="server" Text='<%# Eval("notification") %>'></asp:Label><br /> </ItemTemplate> </asp:Repeater> </marquee>...

how to set background colur of reapeater td dynamically

c#,asp.net,repeater
I'm using one repeater. In that repeater I have one column named 32. If this column gets the value = increased I want to show back color green else red <asp:Repeater ID="grdvPos" runat="server"> <ItemTemplate> <td > <%#Eval ("32")%> </td> </ItemTemplate> ...

How to fire event of textbox with OnItemCommand of a repeater , without using LinkButton?

c#,asp.net,visual-studio-2012,repeater,asprepeater
I have a repeater with a textbox inside , and I want to fire an event when I move from one textbox to another textbox , with the OnItemCommand of the repeater . <asp:Repeater ID="RptrPeople" runat="server" OnItemDataBound="RptrPeople_ItemDataBound" OnItemCommand="RptrPeople_ItemCommand"> <ItemTemplate> <asp:HiddenField ID="hf" runat="server" Value="<%# Eval(this.ValuedPerson) %>" /> <asp:TextBox ID="txtDescription" runat="server" IsRequired="false"...

How do I get the textbox value to the database within a repeater?

c#,asp.net,sql-server,repeater
I have a repeater that I populate from a database: using (SqlConnection conn = new SqlConnection(connString)) { SqlCommand cmd = new SqlCommand(@"SELECT CommunityName, CID, Budget FROM Donation WHERE Year = year(getdate()) ORDER BY CommunityName", conn); conn.Open(); SqlDataAdapter adp = new SqlDataAdapter(cmd); DataSet myDataSet = new DataSet(); adp.Fill(myDataSet); myRep.ItemDataBound += new...

How to move/animate components created by repeater in QML?

qt,qml,repeater
I have a component named Tile in Tile.qml, which I want to create by a Repeater. Tile.qml is as follows: import QtQuick 2.0 Rectangle { id: tile property string tileLabel: label.text property int tileSize: height width: 50 height: tileSize color: "green" border.color: Qt.lighter(color) anchors.bottom: parent.bottom Text { id: label color:...

Protractor: Return Repeater Count from Prototype

javascript,angularjs,count,repeater,protractor
I have this behavior which I can't understand: Cart.prototype.getCouponsCount = function() { // Loop through all rows of coupons currently available in the cart ele.cartCouponsList.count().then(function(count) { console.log("Amount of items in cart:", count); return count; }); }; When called like this: var Cart = require("../../../../lib/cartlib"); var cart = new Cart(); expect(cart.getCouponsCount()).toBe(2);...