开发者

Include a Textbox inside a RadioButton

开发者 https://www.devze.com 2023-02-17 22:59 出处:网络
How would I include a TextBox in the middle of the text of a radio button? For example; I want to have a radio button that says \"Delay my shipment by X days\"

How would I include a TextBox in the middle of the text of a radio button?

For example; I want to have a radio button that says "Delay my shipment by X days"

The X in the abo开发者_如何学Gove example would be a textbox that the user could enter in a value.


An easy way to do this is to just separate the radio button text into several controls:

RadioButton1 Label1 TextBox1 Label2

Where:

  • RadioButton1 has no text.
  • Label1 Text = "Delay my shipment by "
  • Label2 Text = " days"

ASP:

<asp:RadioButton GroupName="MyGroupName" runat="server" />
Delay my shipment by <asp:TextBox runat="server"  /> days.


Why not place the textbox after the radion button: "Delay by no of days: X"

0

精彩评论

暂无评论...
验证码 换一张
取 消