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

Radio Button Visibility

Hi. I have 2 radio buttons on my vb.net web form, and
needed to show/hide them at some point in time, so I
wrapped a DIV tag around each. On the HTML side I have
it set to hidden whenever the page loads. My problem now
is getting the buttons to be "visible" on the server
side. In my code I have declared my div control:

Protected WithEvents divAdd As
System.Web.UI.HtmlControls.HtmlGenericControl

Then in my BuildGrid procedure (after the page loads but
before my grid is shown) I have this:

divAdd.Attributes.Add("Display", "Inline")

I have also set my div tag to runat="server".

I know this is not an HTML forum, (and all my html side
code works fine), but I can't get it to work on the
server side.

Does anyone have any advice?

Thanks in advance for ANY help!

BR
Nov 20 '05 #1
1 2357
Cor
Hi BigRed,

I asume you use a serverside radio button.

I would not wrap it in a div tag, but use in the aspx.vb
radiobutton1.visible = true or radiobutton1.visible = false

Works a lot easier.

(Did you see the attributes method)
\\
TextBox1.Attributes("onblur") = "javascript:alert('Hello! Focus lost from
text box!!');"
//

I hope this helps,

Cor

Nov 20 '05 #2

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

Similar topics

3
by: Owen Funkhouser | last post by:
I have a form with three radio options. And I have three buttons: <input type="submit" name="mainform_action" value="Edit Data"> <input type="submit" name="mainform_action" value="View Data">...
2
by: Bart Verbeke | last post by:
Hi, I have a form with 2 radio buttons (ACCEPT/REJECT). When the page is initially loaded, no textbox should be visible. When a user clicks the REJECT radio button, a textbox should...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
3
by: David Jubinville | last post by:
Hi All, I'm developing a 'testing' page for the current courseware solution I'm working on. Currently I have a single page with each question residing in it's own layer <DIV>. I want to make...
0
by: sam | last post by:
I have 2 radio buttons on my form which are hidden. I need to have these radio buttons visible once a checkbox is selected. The radio buttons are hidden on loading of the form but I cannot make them...
2
by: Scamjunk | last post by:
I am a total JavaScript newbie and I got a JavaScript for maintenance that collapses/expands rows whenever the (-)/(+) GIFs are clicked. Could it be changed to do the same with radio buttons? on...
2
by: Advo | last post by:
Basically, ive got information in a table for the layout purposes, as its text for a questionnaire What i Need, is for instance when the user click a radio button, that information can be...
1
by: Mufasa | last post by:
I have a couple of radio buttons that make various things appear/disappear on the screen through JavaScript. All works great. Problem is I'll click a radio button, something will appear, I reload...
4
by: research_stuff | last post by:
I have researched unhiding text using Javascript. I found examples unhiding text boxes. I need to unhide text when a radio button has been selected. Can someone point me to an example? ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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...

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.