473,322 Members | 1,614 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,322 software developers and data experts.

Changing RadioButton's NAme and ID properties using vb.net

I want to change my radiobutton's name ,id and value properties
programmatically.

RadioButton1.Attributes.Add("value", "Pele")

RadioButton1.Attributes.Add("name", "R1")

RadioButton1.Attributes.Add("id", "SAVAS")

It returns

<span name="R1" id="SAVAS" style="Z-INDEX: 101; LEFT: 8px; POSITION:
absolute; TOP: 8px"><input id="RadioButton1" type="radio"
name="RadioButton1" value="Pele" /></span>

My first Html code is like that

<asp:RadioButton id="RadioButton1" style="Z-INDEX: 101; LEFT: 8px; POSITION:
absolute; TOP: 8px"
runat="server"></asp:RadioButton>
Mar 24 '06 #1
2 2001
RadioButton1.ID = "SAVAS"
In place of the value attribute, you can use the text attribute.
RadioButton1.Text = "Pele"
The name attribute is deprecated in the xhtml standard and it's role is
replaced by ID.

Regards.

Mar 24 '06 #2
By the way the <span ...>...</span> html block is the client side code
- it's what you see when you look at the source of the browser side
code.

The <asp:RadioButton ...></asp:RadioButton> code block is the server
side page - what you see in Visual Studio source view.

The ASP.NET framework would render the server tags at runtime to
specific html tags that is suitable for the browser on the client
making the http request (adaptive rendering).

Regards.

Mar 25 '06 #3

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

Similar topics

2
by: Google Mike | last post by:
I've got pyGTK 2-1.99.14 (which comes with my RH9 Linux). Does anyone know how to set the gtk.RadioButton font? I'm finding the font size too big for an application I need to build.
11
by: William Gill | last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep references to them in a 2 dimensional list ( rBtns ). It works fine, and I can even make it so only one button per column can be...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
3
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...
2
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2">...
1
by: MickG | last post by:
I am trying to change the value of the variable "hard" according to which radio button is pressed and I am having no joy. Could anyone help me with this, the problematic section is marked with...
5
by: Matt Jensen | last post by:
Am I right in saying that you can't have a Radiobutton web control inside a repeater bound to a database datasource and (inline) dynamically set it's ID and text properties from the repeaters rows?...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
0
by: member | last post by:
Hi, Good day.i need some help from you guys. I'm using vb.net and sql database to build my file. The purpose of this file is to view news based on deparment. Im using listbox and radiobutton...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.