Jump to content

how to use server .htmlEncode in gridview

- - - - -

  • Please log in to reply
1 reply to this topic

#1
Sanu

Sanu

    Newbie

  • Members
  • Pip
  • 8 posts
plz help me

i m making a quiz site in which we are binding answers in radio buttons using gridview.When we are binding html <tag> based answers like this


A.<hr>
B.<line> (correct Ans)
C.<horizontal line>
D.<tr>

the problem is that at the time of display, it display a horizontal line instead of text.
i also try these :--
<%# System.Web.HttpUtility.HtmlEncode((string)Eval("A")) %>

<%# server.HtmlEncode(Bind("B"))%>
but it responds the error ...
the "bind" doesn't exist in the correct context.
the "server" doesn't exist in the correct context.
so plz tell me how to display these html tags in text form.



Thanks
With Regds
Preeti

#2
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
haven't you read my previous answer:mad: !! btw no double posting :rules:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users