473,756 Members | 5,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

validate radiobuttonlist in DataList

6 New Member
Hi
Please help how do i validate that one of radiobuttonlist contained in datalist has been selected or not



Expand|Select|Wrap|Line Numbers
  1.  
  2. <asp:datalist id="datalst" Runat="server" RepeatLayout="Table" CellPadding="5" CellSpacing="5"
  3. BorderWidth="0" RepeatColumns="4">
  4. <ItemTemplate>
  5. <asp:Label id=lbllogoid Visible="false" Runat="server" text='<%# DataBinder.Eval(Container.DataItem,"UsrLogoId")%>'>
  6. </asp:Label>
  7. <asp:Image ID="logoimg" Runat="server" ImageUrl='<%#ImageUrl(Convert.ToInt32(DataBinder.Eval(Contain er.DataItem,"UsrLogoId")))%>'></asp:Image>
  8. <asp:RadioButtonList id="rdbList" Runat="server" EnableViewState="True" OnSelectedIndexChanged="OnSelection" AutoPostBack="True">
  9. <asp:ListItem Value="1">1</asp:ListItem>
  10. <asp:ListItem Value="2">2</asp:ListItem>
  11. <asp:ListItem Value="3">3</asp:ListItem>
  12. </asp:RadioButtonList>
  13. </ItemTemplate>
  14. </asp:datalist>
  15.  
Apr 24 '07 #1
0 1031

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7041
by: Christian H | last post by:
Hi! I'm wondering how I can add extra html to a radiobuttonList, so that I can control how: -the whole radioButtonList is rendered. -each of the radiobutton elements are rendered. What I am basically trying to do is to combine x radioButtonlists, so that the output will look like this: ----------------------------------------------------------------------------
0
1769
by: ani | last post by:
Hi, I have a datalist control and within the Itemplate I have a radiobuttonlist control . I am binding data to the datalist control in Page_load . Also I have sqldatareader object that needs to be binded to the radiobutton list. I am not able to bind the datareader to the radiobuttonlist control as it is within the Itemtemplate. I am new to .Net. Could someone please let me know what I should be
0
911
by: ani | last post by:
How do I add radiobuttonlist within a datalist control. I am able to add the control outside the datalist . When I try to put the same inside datalist in a itemtemplate it doesn't work. I am a newbie. Please help! If you have any articles regarding this, that would be of great help. I didn't find any.
0
985
by: ani | last post by:
I learnt that we cannot add radiobuttonlist within a datagrid, unless you have a custom control and then add it programmatically. Is it true with datalist? Can I get asp server control values through request.form ?
0
1095
by: Nevyn Twyll | last post by:
I have a set of radiobuttons that I want to put as an element in a Datalist. But I need the radiobuttons to have a very particular look, so I can't use the RadioButtonList class. So, I made a user control, with all my pretty radio buttons in it, and gave them the same GroupName so they act as a group. I put it in the datalist, and it shows up just fine, and acts correctly when I select different values, etc. My questions are: (1) how...
2
3169
by: WB | last post by:
Hi, I have the following nested RadioButtonList in my web page that displays a list of cities (categorized in states) for the user to select. There's a RequiredFieldValidator to ensure user has selected one state. <asp:RequiredFieldValidator ID="VrqCity" runat="server" CssClass="error" ErrorMessage="Please select a city" ControlToValidate="RblCities" /><br /> <asp:Repeater ID="RptStates" runat="server"
0
2046
by: Sudheer Aalla | last post by:
Hi, When I try to reference the radiobuttonlist control in edititemtemplate in ItemDataBound event of datalist control I am getting NULL reference. I am trying to pre select the yes/no button depending on the label text in item template. But I am able to get the value of lable control which is in itemtemplate. Is there anything else I am missing here??? public void DataListItems_ItemDataBound(object sender, DataListItemEventArgs e)
0
1263
by: na | last post by:
I am trying to build the master and child relationship in a DataList's ItemTemplate. The DataList is bound to to an ObjectDataSource which is bound to an DataTable in a DataSet defined in an xsd file. The DataTable is based on MS SQL stored proc which joints a master and a child tables. I need to list the master record only ONCE and all its children listed as RadioButtonList HORIZONTALLY. For example: master1 oChild11 oChild12...
1
1626
by: Nathan Sokalski | last post by:
I have a RadioButtonList as one of the Controls in the ItemTemplate of my DataList. I am using a For Each loop to go through the Items property, but even if one of the RadioButtons has been selected, they all return False. What am I doing wrong? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.