Link to home
Start Free TrialLog in
Avatar of learningnet
learningnet

asked on

show dynamic text in the radio button

Hello Experts,

I am assigning text to the radio buttons dynamically, its showing them fine however i am unable  to adjust its alignment.

I mean, if the text is more its showing it in the next line and starting from its full left, all I wanted is to align the second line text with the first, so that text for the both lines start from the same place.

I hope you understand what I am trying to say you here?

Please can someone advise?

Thanks
kay

<asp:RadioButtonList ID="rdoMultipleOptions" runat="server"></asp:RadioButtonList>&nbsp;
 ====================================================================
 
 Dim MultipleOptions As Integer
            rdoMultipleOptions.Items.Clear()
            For MultipleOptions = 0 To 3 Step 1
                rdoMultipleOptions.Items.Add(DV(MultipleOptions)("Option").ToString())
            Next

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of JorisW
JorisW

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of learningnet
learningnet

ASKER

hello JorisW,

thanks for your help. that seems to have worked if the text continues in the next line.

for those who have lless text appearing in the next line

if you please see the attached

thanks
 
screen1.jpg
screen2.jpg
Are you sure there is not a <br> before "Chan"? (probably just a simple newline in asp).

Could you post the (html) source code of the problem (or just provide a link). Also, what is wrong in the second screenshot?
hi jorisw,
i am sorry i dont have any live link for you to show, i am doing locally on my PC at the moment.

i am pulling data from the database and assigning to the radiobutton and there is no <br> getting added...

i am not sure why is it behaving like this...

there is no problem in screen2, that was only to show you i am having no problem in the longer text, its now only if i have less text, please see the attached


<table id="rdoMultipleOptions" border="0">
		<tr>
			<td><input id="rdoMultipleOptions_0" type="radio" name="rdoMultipleOptions" value="Cocoa powder it contains" /><label for="rdoMultipleOptions_0">Cocoa powder it contains</label></td>
		</tr><tr>
			<td><input id="rdoMultipleOptions_1" type="radio" name="rdoMultipleOptions" value="Cocoa solids it contains" /><label for="rdoMultipleOptions_1">Cocoa solids it contains</label></td>
		</tr><tr>
 
			<td><input id="rdoMultipleOptions_2" type="radio" name="rdoMultipleOptions" value="Cocoa beans it contains" /><label for="rdoMultipleOptions_2">Cocoa beans it contains</label></td>
		</tr><tr>
			<td><input id="rdoMultipleOptions_3" type="radio" name="rdoMultipleOptions" value="Cocoa butter it contains" /><label for="rdoMultipleOptions_3">Cocoa butter it contains</label></td>
		</tr>
	</table>

Open in new window

screen3.jpg
if i do not apply any styles for the label then the same one liner is coming up ok but the 2 liners are breaking


 <style>
    #rdoMultipleOptions input {
  float: left;
}

<%--#rdoMultipleOptions label {
  display: block;
  margin-left: 1.5em;
}--%>
    </style>
screen4.jpg
please have the markup attached


<table border="0" id="rdoMultipleOptions">
		<tbody><tr>
			<td><input type="radio" value="It  enables your body to burn calories" name="rdoMultipleOptions" id="rdoMultipleOptions_0"/><label for="rdoMultipleOptions_0">It  enables your body to burn calories</label></td>
		</tr><tr>
			<td><input type="radio" value="It encourages deep breathing" name="rdoMultipleOptions" id="rdoMultipleOptions_1"/><label for="rdoMultipleOptions_1">It encourages deep breathing</label></td>
		</tr><tr>
			<td><input type="radio" value="It allows the brain and body essential time to replenish itself, preventing fatigue" name="rdoMultipleOptions" id="rdoMultipleOptions_2"/><label for="rdoMultipleOptions_2">It allows the brain and body essential time to replenish itself, preventing fatigue</label></td>
		</tr><tr>
			<td><input type="radio" value="It prevents a build up of energy" name="rdoMultipleOptions" id="rdoMultipleOptions_3"/><label for="rdoMultipleOptions_3">It prevents a build up of energy</label></td>
		</tr>
	</tbody></table>

Open in new window

mmm I still cant recreate the problem. Could you perhaps save the page and attach it?
hello jorisw,

i have tried but i think you may not be able to reproduce the problem even i attached the markup ..

please is it possible for you to access my PC remotely?

www.logmein.com--> you dont have to install anything on your PC and u may use the browser to access

www.teamviewer.com --> small software which you can install and get connected, free and fast !

please can you let me know?  you may write me here niidmore@yahoo.com i will provide you the access details...

your help will greatly be appciated as i am completely stuck with it..

thanks
Wouldn't it be easier for you if you open port 80 temporarily, tell me your IP so I could just visit your web server?
hi
unfortunately i dont know how to open port 80 and its my development local PC so i dont know whether i could even do that?

logmein is quick, please let me know..

thanks
I mailed you my address