I have a DataListItem which can potentially be a dropdownlist or a textbox. To get the value I would need to do:
CType(item.FindControl("myControl"), TextBox).Text
Or
CType(item.FindControl("myControl"), DropDownList).SelectedValue.ToString()
The problem is, if it's a dropdownlist I get..
Unable to cast object of type
'Syste...
I'm having problem getting all the values in datalist
here is the problem:
I have datalist which is populated dynamically from table in database, the aspx page is the bulk order page so there are many items in datalist and I want the user to be able to selct multiple orders at once in mode and select a buuton in which is called ch...
I have one checkbox control in Datalist Header and some controls in Item Template. On click of the "Submit" button in the page I should capture the state of controls from Datalist.
For Item template I can get the values from datalist.Items property.
How can I get the state of checkbox in "Header Template"?
...
how to use the template image button as the downlaod files in datalist?
...
(submit said I was trying to post an image so I've changed image everywhere to <img>
I am trying to get jQuery to replace an <img> inside a datalist. The original <img> is the thumbnail image of a product on a category page. The small <img> I am clicking on are swatch images for the different colors of a product. I can get it to work usi...
I am using 2 linkbuttons inside seperate dataitem server controls on my asp.net web page
<asp:LinkButton ID="Item1" runat="server" CommandName="first"
OnCommand="Item1_Onclick" CommandArgument="<%# Container.DataItem %`>"
Text="<%# Container.DataItem %`>" >
</asp:LinkButton`>
and
<asp:LinkButton ID="Item2" runa...
<asp:DataList ID="ItemsList" RepeatDirection="Vertical" runat="server">
<ItemTemplate>
<asp:LinkButton
ID="SecondLevelItem" runat="server" CommandName="second"
OnCommand="SecondLevelItem_Onclick" CommandArgument="<%# Container.DataItem %>"
Text="<%# Container...