Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Error: Dropdown list

Error: Dropdown list

Scheduled Pinned Locked Moved ASP.NET
questionhtmldatabasehelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A Muthunagai
    wrote on last edited by
    #1

    Hi, I'm using Drop down list. List of Quesitons stored in a database. I'm collecting the questions and load it to the drop down list in Page load event. When I select the Drop down list, the selected question and answer will display in the text boxes name txtquestion, txtanswer. But I got this error when I select the Drop Down list "A potentially dangerous Request.Form value was detected from the client" The Questions and Answer having HTML tags. will it cause the Error? If so How can I Split the tags and load the Questions alone in the drop down list? Thanks in Advance

    C N 2 Replies Last reply
    0
    • A A Muthunagai

      Hi, I'm using Drop down list. List of Quesitons stored in a database. I'm collecting the questions and load it to the drop down list in Page load event. When I select the Drop down list, the selected question and answer will display in the text boxes name txtquestion, txtanswer. But I got this error when I select the Drop Down list "A potentially dangerous Request.Form value was detected from the client" The Questions and Answer having HTML tags. will it cause the Error? If so How can I Split the tags and load the Questions alone in the drop down list? Thanks in Advance

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Muthunagai.A wrote:

      will it cause the Error?

      Yes. You can turn it off with ValidateRequest="false" in your page definition.

      Muthunagai.A wrote:

      If so How can I Split the tags and load the Questions alone in the drop down list?

      You can just use the HTMLEncode method ( not sure from memory what object it's on ), to change the text to not be HTML.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      A 1 Reply Last reply
      0
      • C Christian Graus

        Muthunagai.A wrote:

        will it cause the Error?

        Yes. You can turn it off with ValidateRequest="false" in your page definition.

        Muthunagai.A wrote:

        If so How can I Split the tags and load the Questions alone in the drop down list?

        You can just use the HTMLEncode method ( not sure from memory what object it's on ), to change the text to not be HTML.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        A Offline
        A Offline
        A Muthunagai
        wrote on last edited by
        #3

        Hi, I set the ValidateRequest as false. Include the System.Web.HttpUtility also. But Still having the same error

        1 Reply Last reply
        0
        • A A Muthunagai

          Hi, I'm using Drop down list. List of Quesitons stored in a database. I'm collecting the questions and load it to the drop down list in Page load event. When I select the Drop down list, the selected question and answer will display in the text boxes name txtquestion, txtanswer. But I got this error when I select the Drop Down list "A potentially dangerous Request.Form value was detected from the client" The Questions and Answer having HTML tags. will it cause the Error? If so How can I Split the tags and load the Questions alone in the drop down list? Thanks in Advance

          N Offline
          N Offline
          Nand Kumar Das
          wrote on last edited by
          #4

          U'r question is already in dropdwonlist so you can get question on your question textbox and in the event of dropdwonlist_selectindexchanged you get your answer from database and assign it to answer textbox event dropdwonlist_selectindexchanged txtquest.text=dropdwonlist.selecteditem Nand Nand

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups