473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

What .NET controls to use???

I need to generate a list of radio buttons, from either a database or an XML
file (I'd prefer to go the XL route). Now, for each item in my database/XMl
file, I have a foreign key to data that I will access through a Web Service
I've created. I would like to take the data that is returned and populate a
combo box next to the radio button (if applicable).

Is it possible to use the existing .NET controls (RadioButtonList,
DropDownList, Repeater) to give me this functionality, or do I need to
program all this in the Page_Load. I know I could do it in 10 minutes in
classic ASP, but I'm really trying to do this the "right" way for .NET. Any
suggestions would be greatly appreciated.
Nov 18 '05 #1
3 1220
I would use a DataGrid with Template col, this will allow you to do
what you need. You can use the Web control radio buttons within the
template colums and then you can late bind if they should be selected
or not. I just did this from a DB it was not to bad once I figured out
how it all works. I am pretty new to .NET so I am not sure this is the
best way but it is how I did it.

B

"Random" <ci*******@hotmail.com> wrote in message news:<Os**************@TK2MSFTNGP12.phx.gbl>...
I need to generate a list of radio buttons, from either a database or an XML
file (I'd prefer to go the XL route). Now, for each item in my database/XMl
file, I have a foreign key to data that I will access through a Web Service
I've created. I would like to take the data that is returned and populate a
combo box next to the radio button (if applicable).

Is it possible to use the existing .NET controls (RadioButtonList,
DropDownList, Repeater) to give me this functionality, or do I need to
program all this in the Page_Load. I know I could do it in 10 minutes in
classic ASP, but I'm really trying to do this the "right" way for .NET. Any
suggestions would be greatly appreciated.

Nov 18 '05 #2
Thank you. This sounds great. If you could post any examples on the late
binding to other controls, I would be very thankful.
"Bliss" <bg***********@landolakes.com> wrote in message
news:61**************************@posting.google.c om...
I would use a DataGrid with Template col, this will allow you to do
what you need. You can use the Web control radio buttons within the
template colums and then you can late bind if they should be selected
or not. I just did this from a DB it was not to bad once I figured out
how it all works. I am pretty new to .NET so I am not sure this is the
best way but it is how I did it.

B

"Random" <ci*******@hotmail.com> wrote in message
news:<Os**************@TK2MSFTNGP12.phx.gbl>...
I need to generate a list of radio buttons, from either a database or an
XML
file (I'd prefer to go the XL route). Now, for each item in my
database/XMl
file, I have a foreign key to data that I will access through a Web
Service
I've created. I would like to take the data that is returned and
populate a
combo box next to the radio button (if applicable).

Is it possible to use the existing .NET controls (RadioButtonList,
DropDownList, Repeater) to give me this functionality, or do I need to
program all this in the Page_Load. I know I could do it in 10 minutes in
classic ASP, but I'm really trying to do this the "right" way for .NET.
Any
suggestions would be greatly appreciated.

Nov 18 '05 #3
Here is a grid I used it in. Pay attentino to the
<%# !resolveBoolean(DataBinder.Eval(Container.DataItem ,"Coming").ToString())%>

In the code behind you set the data src as normal and call the
databind as normal. However this stmt in the aspx will cause a late
binding allowing you to do things like examine the data and make
decisions on it before it is displayed.

Thanks,
Brette



<asp:datagrid id="GrdRSVP" runat="server" BorderColor="#F14700"
BackColor="#F14700" BorderStyle="None"
CellPadding="2" Width="536px" AutoGenerateColumns="False"
ForeColor="#F14700" Font-Names="Century Gothic"
GridLines="Horizontal" Font-Size="Smaller"
HorizontalAlign="Left">
<FooterStyle Font-Size="Small" Font-Names="Century Gothic"
ForeColor="#F29412" BackColor="#F29412"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<AlternatingItemStyle
BorderColor="#C04000"></AlternatingItemStyle>
<ItemStyle Font-Size="X-Small" Font-Names="Century Gothic"
HorizontalAlign="Left" ForeColor="Cornsilk"
VerticalAlign="Middle" BackColor="#F14700"></ItemStyle>
<HeaderStyle Font-Size="Small" Font-Names="Century Gothic"
Font-Bold="True" HorizontalAlign="Left"
ForeColor="Cornsilk" VerticalAlign="Middle"
BackColor="#F29412"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="FirstName" HeaderText="First
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="LastName" HeaderText="Last
Name"></asp:BoundColumn>
<asp:BoundColumn Visible="False"
DataField="GuestId"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Yes/No">
<ItemTemplate>
<asp:RadioButton id=RadioYes runat="server"
GroupName="radio" Checked='<%#
resolveBoolean(DataBinder.Eval(Container.DataItem, "Coming").ToString())%>'>
</asp:RadioButton>
<asp:RadioButton id=RadioNo runat="server"
GroupName="radio" Checked='<%#
!resolveBoolean(DataBinder.Eval(Container.DataItem ,"Coming").ToString())%>'>
</asp:RadioButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC"></PagerStyle>
</asp:datagrid>


"Random" <ci*******@hotmail.com> wrote in message news:<OO**************@TK2MSFTNGP12.phx.gbl>...
Thank you. This sounds great. If you could post any examples on the late
binding to other controls, I would be very thankful.
"Bliss" <bg***********@landolakes.com> wrote in message
news:61**************************@posting.google.c om...
I would use a DataGrid with Template col, this will allow you to do
what you need. You can use the Web control radio buttons within the
template colums and then you can late bind if they should be selected
or not. I just did this from a DB it was not to bad once I figured out
how it all works. I am pretty new to .NET so I am not sure this is the
best way but it is how I did it.

B

"Random" <ci*******@hotmail.com> wrote in message
news:<Os**************@TK2MSFTNGP12.phx.gbl>...
I need to generate a list of radio buttons, from either a database or an
XML
file (I'd prefer to go the XL route). Now, for each item in my
database/XMl
file, I have a foreign key to data that I will access through a Web
Service
I've created. I would like to take the data that is returned and
populate a
combo box next to the radio button (if applicable).

Is it possible to use the existing .NET controls (RadioButtonList,
DropDownList, Repeater) to give me this functionality, or do I need to
program all this in the Page_Load. I know I could do it in 10 minutes in
classic ASP, but I'm really trying to do this the "right" way for .NET.
Any
suggestions would be greatly appreciated.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
4
by: Kristoffer Arfvidson | last post by:
Im trying to get access to a table in codebehind, because the information in this table is different depending on what it says in the database... So, either I have to access it from codebehind,...
1
by: JS | last post by:
Hello, I am using ASP .Net to create my own web controls and I have noticed that there is one too many requirements that forces the developer to be aware of and get involved with. In the past...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
8
by: Alan Silver | last post by:
Hello, ASP.NET newbie here so please be nice ;-) I'm reading ASP.NET Unleashed, following a recommendation here. I am a little confused about the difference between HTML controls and web...
5
by: mytestemailaccount | last post by:
Hi, Hope you can help. I am relatively new to all this but would appreciate the groups help. The scenario: I am c# and asp.net to create a web application. The web page contains a user...
3
by: MikeY | last post by:
Hi everyone, I'm trying to figure out, on my windows form, of what is the best way to add various custom controls at various times during run-time. The problem is that they will need to be in...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
1
by: active | last post by:
I tried to use the help on 'controls' to find out what it is used for but there is so many different uses for the word as to make the help useless. So I tried the following. It appears the...
12
by: Eric Layman | last post by:
Hi, What's the difference between a normal web element: <input type="text" id="txtname" name="txtname" runat="server"> vs webcontrol text box: <asp:Textbox id="username" Columns="10"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.