I am new in asp.net and i want to use DATALIST CONTROL.Plz tell me how to use that controlstep by step process..
View Complete Post
I want to find control inside datalist, i am using this:
//here got error: Index was out of range. Must be non-negative and less than the size of the collection.
here is my aspx code:
<asp:DataList ID="DataList1" runat="server" DataKeyField="nsid">
<asp:Label ID="Label1" Text='<%# Eval("ncompany") %>' Runat="Server" CssClass="subject&quo
I am working on survey application......
I have taken a datalist in which the question in survey are bound in a label control
now user can change color of the question using color picker
color picker have a popup which is closed when user selects a color and
the color of question will be updated as popup closes
So i have to find label control(in which i bound questions)
and update the color of label selected by color picker
I googled and found following code but it show null value
var lbl =
when I saw the page source following id is generated for label
ctl00_ContentPlaceHolder1_dList_ctl00_lblQuestionctl00_ContentPlaceHolder1_dList_ctl01_lblQuestion and so onD
I have a label control in datalist. When thw word is long, the text of label corrupts the design. Label hasn't a multiline property.
I tried different ways . I tried to use textbox like a label but this time I can't give a link to textbox.I tried to use MeasureString() method for the label. But I couldn't do it.
Please help me... Thanks....
i'm having some problem with my validation control that i put inside my datalist template. the purpose of the validation is to ensure that user enter only integer at the textbox inside the datalist. however, if there is more that 1 record/row at the datalist and i enter the integer only in one of the textbox at a specific row, the validation control ask me to enter a value for the other datalist record when i press the button. so my question is, is there a way to make sure that the validation control only check the specific textbox at the specific row?? i tried editing the properties of the validation control but i cannot find anything that is relevant...
Your help is greatly appreciated!!
Thank you in advance
Hello, I have a datalist control
In it, I have a hyperlink that im binding the url, and the text to from a mysql database
here is my code so far
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Bind("topicid") %>' Text='<%# Bind("title") %>'></asp:HyperLink>
Now, the problem is, the field "topicid" returns a number, such as 3. I want to add the following text before it: viewTopic.aspx?id=
So, ideally, i want something like this
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%# "viewTopic.aspx?id=" + Bind("topicid") %>' Text='<%# Bind("title") %>'></asp:HyperLink>
But, when I do it that way, I obviously get an error.
So, is there any way to solve this problem without having to modify the database?
Hi. I have created a DataList like below. I want to use it as template or call it's ItemTemplate in new created DataList control. Does anyone has any idea? Please HELP . THANKS!!
<asp:DataList ID="MyDataList" runat="server" CellPadding="4" CssClass="dlist" ForeColor="#333333"> <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" /> <AlternatingItemStyle BackColor="#9999FF" ForeColor="#0000CC" /> <ItemStyle BackColor="Lavender" BorderColor="#00CCFF" BorderStyle="So
I really love GridView and I like to use it whenever it suits well. Just out of curisority, recently, I been thinking what if i wanna get sme data from the GridView I just bind on the page without actually nesting each column and row? For example :
From the above table, say I wanna take the value Three and Five. How can I get it back from the table ? I know I can query back the database to get the value but that's not what I am trying to figure out here. Thanks all and will be looking forward to getting some cool stuff from you guys.