In html and ASP, I would easily code radio buttons as needed, such as:
<input type="radio" name="question1 " value="1">1</input>
<input type="radio" name="question1 " value="2">2</input>
<input type="radio" name="question1 " value="3">3</input>
If I use the <asp:radiobutto ncontrol, I can do this:
<asp:RadioButto n ID="RB1" GroupName="ques tion1" runat="server" />1
<asp:RadioButto n ID="RB2" GroupName="ques tion1" runat="server" />2
<asp:RadioButto n ID="RB3" GroupName="ques tion1" runat="server" />3
My problem with this is that I can't specify a value. When the form is
filled out, I need a value between 1 and 5 to be inserted into the
database. In the above example, the value is actually whatever the ID is
and since I can't have duplicate IDs, then that rules out the use of
<asp:RadioButto n />.
The <asp:radiobutto nlist /would probably work ok but I can't place the
radio buttons (the <asp:listitem />) side by side. It only puts the
radio buttons vertically.
<asp:RadioButto nList ID="RBL1" runat="server">
<asp:ListItem>1 </asp:ListItem>
<asp:ListItem>2 </asp:ListItem>
<asp:ListItem>3 </asp:ListItem>
</asp:RadioButton List>
Looking at the source after the page is rendered, I can see that it
creates a table to display the radiobuttons. The value is present
though, which is what I would need for my database.
I was hoping to not use <inputtags this time around and use more
'advanced' coding techniques, but I don't know how I would go about
using server controls considering my display and value requirements.
Any input would be appreciated.
TIA,
Jim 4 4695
asp.net controls all use the Text property to render the value.
-- bruce (sqlwork.com)
"Jim in Arizona" <ti*******@hotm ail.comwrote in message
news:O2******** ******@TK2MSFTN GP04.phx.gbl...
In html and ASP, I would easily code radio buttons as needed, such as:
<input type="radio" name="question1 " value="1">1</input>
<input type="radio" name="question1 " value="2">2</input>
<input type="radio" name="question1 " value="3">3</input>
If I use the <asp:radiobutto ncontrol, I can do this:
<asp:RadioButto n ID="RB1" GroupName="ques tion1" runat="server" />1
<asp:RadioButto n ID="RB2" GroupName="ques tion1" runat="server" />2
<asp:RadioButto n ID="RB3" GroupName="ques tion1" runat="server" />3
My problem with this is that I can't specify a value. When the form is
filled out, I need a value between 1 and 5 to be inserted into the
database. In the above example, the value is actually whatever the ID is
and since I can't have duplicate IDs, then that rules out the use of
<asp:RadioButto n />.
The <asp:radiobutto nlist /would probably work ok but I can't place the
radio buttons (the <asp:listitem />) side by side. It only puts the radio
buttons vertically.
<asp:RadioButto nList ID="RBL1" runat="server">
<asp:ListItem>1 </asp:ListItem>
<asp:ListItem>2 </asp:ListItem>
<asp:ListItem>3 </asp:ListItem>
</asp:RadioButton List>
Looking at the source after the page is rendered, I can see that it
creates a table to display the radiobuttons. The value is present though,
which is what I would need for my database.
I was hoping to not use <inputtags this time around and use more
'advanced' coding techniques, but I don't know how I would go about using
server controls considering my display and value requirements.
Any input would be appreciated.
TIA,
Jim
bruce barker (sqlwork.com) wrote:
asp.net controls all use the Text property to render the value.
-- bruce (sqlwork.com)
Thanks Bruce. I'll see what I can do with that info.
Hi Jim,
the radiobuttonlist has a property named "RepeatColu mns" which actually
is the number of radiobuttons to display in one row. Maybe this helps as
well.
Kind Regards,
Roland
Jim in Arizona schrieb:
The <asp:radiobutto nlist /would probably work ok but I can't place the
radio buttons (the <asp:listitem />) side by side. It only puts the
radio buttons vertically.
Roland Dick wrote:
Hi Jim,
the radiobuttonlist has a property named "RepeatColu mns" which actually
is the number of radiobuttons to display in one row. Maybe this helps as
well.
Kind Regards,
Roland
Jim in Arizona schrieb:
>The <asp:radiobutto nlist /would probably work ok but I can't place the radio buttons (the <asp:listitem />) side by side. It only puts the radio buttons vertically.
Thanks Rick. That's actually was I was looking for. :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VK |
last post by:
Hi!
What I'm missing in following code? Cannot get the values of
radiobuttons. Starting only one class (GetVariant), it works. When I put
two classes together, it doesn't.
Regards, VK
from Tkinter import *
class GetVariant:
def __init__(self):
self.root = Tk()
|
by: sofie |
last post by:
Hello all,
I use the following javascript function in a html document to set the
level of one of eight available radiobuttons. The line that's
commented out works fine under IE, but I need to rewrite it so that
it's W3C compliant. Reading through earlier messages I concluded I
should go with getElementById but this doesn't work. What am I doing
wrong?
Your help is much appreciated.
|
by: dave |
last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs a postback.
I only want to do a postback if the value of the radiobutton is changed.
What is the best method to accomplish this?
thx
dave
|
by: Alan Samet |
last post by:
If you need to get in touch with me, be sure to remove the
"newsgroups" from my email address.
I've developed a quick-and-dirty workaround for putting
System.Web.UI.WebControls.RadioButton controls in repeater-style
controls. I've only tested it a little, but it seems like it should
work fine for getting around that naming issue that arises when you
have a set of radio buttons that should be grouped together; but
because they exist on...
|
by: visual2005beta_developer |
last post by:
I have the following problem (especially with the groupname-attribut of the
RadioButton-Control) when developing in Visual Studio 2005 Beta.
I load an ascx-control in an aspx-page. This ascx-control itself creates
dynamically many radiobuttons in this way:
foreach (DataRow radiobutton_item in rbl_values.Rows)
{
RadioButton single_radiobutton = new RadioButton();
single_radiobutton.ID = "idname";
single_radiobutton.GroupName =...
| |
by: Radiobutton via DotNetMonster.com |
last post by:
i need help with radiobuttons.
i am useing 1button and 2 radiobuttons i am trying to make it so when u
select a radiobutton and hit button1 it will clear radiobuttons 1 and 2.
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-csharp/200605/1
|
by: Igor |
last post by:
RadioButton have property Checked (true or false).
If I make RadioButtons with code, without drawing by mouse than I have
problems. I write like this:
Dim rb(0 To 2) As RadioButton
Dim n As Integer
For n = 0 To 2
rb(n) = New RadioButton
rb(n).Text = "Text: " + CStr(n)
|
by: Mufasa |
last post by:
How can I make an asp:radiobutton where when the user selects it it runs
javascript code? I've tried doing the following but it doesn't seem to work:
arbLogoAttached.Attributes.Add("OnCheckedChanged",
"javascript:RadioClicked();");
But that doesn't seem to work. And it doesn't seem to put the onclick or
oncheckedchanged on the input itself - it's putting it on a span around the
object.
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
If you enclose a group of radiobuttons (option buttons in MS Access) in an
option group control (a frame control) in Access -- the frame control will
return the index of the option button that is checked.
In VB.Net if I enclose a group of radiobuttons in a groupbox control - I get
the single checked radiobutton behavior, but the groupbox does not seem to
return the index of the checked radiobutton. Is there a way to get the
groupbox...
|
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...
|
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,...
| |
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |