Jump to content

Display <> tags as a text like <hr> in dynamically generated radio button

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Sanu

Sanu

    Newbie

  • Members
  • Pip
  • 8 posts
hello

plz help me

i m making a quiz site in which we are displaying questions with multiple choice options using labels and radio button which are generated dynamically at the page load.When we are displaying html <tag> based question like this

question1: What is the correct HTML tag for inserting an horizontal line ?
A.<hr>
B.<line>
C.<horizontal line>
D.<tr>

the problem is that at the time of display it display a horizontal line instead of text.
so plz tell me how to display these html tags in text form.



Thanks
With Regds
Preeti

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You have to escape them. HTML Escape Characters: Complete List
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
this is a peice of cake , here is the code , note that you need to provide whitespace between the symbol & word to get the effect.
 <asp:RadioButtonList ID="RadioButtonList1" runat="server">
            <asp:ListItem>< hr ></asp:ListItem>
            <asp:ListItem>< hr ></asp:ListItem>
            <asp:ListItem>< hr ></asp:ListItem>
        </asp:RadioButtonList>

or you can also try

 <asp:RadioButtonList ID="RadioButtonList1" runat="server">
            <asp:ListItem>< hr ></asp:ListItem>
            <asp:ListItem>< hr ></asp:ListItem>
            <asp:ListItem>< hr ></asp:ListItem>
        </asp:RadioButtonList>


Feed me more +Reps:thumbup1:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users