disabled radio button in html

tuzojazz

New member
Joined
Sep 30, 2009
Messages
1
Programming Experience
1-3
Hi guys:

This is my code for a radio button. "disabled" is not a property of asp:radiobutton
VB.NET:
<asp:radiobutton id="rdbPeriod"  runat="server" [B]disabled="true"[/B] Text="Period" GroupName="Ab"></asp:radiobutton>

the output html is this

VB.NET:
[B]<span disabled="true">[/B]<input id="rdbPeriod" type="radio" name="Ab" value="rdbPeriod" /><label for="rdbPeriodo">Period</label></span>

why the input is enclosed whithin <span> tags?

I want to get this ouptut html

VB.NET:
<input id="rdbPeriod" type="radio" name="Ab" value="rdbPeriod" [B]disabled="true"[/B] /><label for="rdbPeriodo">Period</label>

How can I do it?

Thanks!
 
Enabled="false"

VB.NET:
<asp:RadioButton Enabled="false" ID="rdbPeriod" runat="server" Text="Period" />

And the output (View Source) is as follows:

VB.NET:
<span disabled="disabled"><input id="rdbPeriod" type="radio" name="rdbPeriod" value="rdbPeriod" disabled="disabled" /><label for="rdbPeriod">Period</label></span>
 
Back
Top