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. General Programming
  3. C#
  4. I get an error when my textbox has texts with html tags

I get an error when my textbox has texts with html tags

Scheduled Pinned Locked Moved C#
helpcsharphtmlquestion
2 Posts 2 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.
  • C Offline
    C Offline
    CandyMe
    wrote on last edited by
    #1

    A potentially dangerous Request.Form value was detected from the client. I have a webpage using .net 2.0 with an asp:button Back and a textbox with text = "" I've done my research and everything I see says set ValidateRequest="false" in page directive which I did. There's no problem if I click the browsers back button. But when I click my own asp button BtnBack, the error is produced. Is there something like setting the validation within my own button? Thanks!

    J 1 Reply Last reply
    0
    • C CandyMe

      A potentially dangerous Request.Form value was detected from the client. I have a webpage using .net 2.0 with an asp:button Back and a textbox with text = "" I've done my research and everything I see says set ValidateRequest="false" in page directive which I did. There's no problem if I click the browsers back button. But when I click my own asp button BtnBack, the error is produced. Is there something like setting the validation within my own button? Thanks!

      J Offline
      J Offline
      jimjo
      wrote on last edited by
      #2

      Hi, When browser back button is clicked, no new request is sent to browser, I think(unless we expire the page programmatically). Most probably, you have written a Response.Redirect in your asp button click, right? So, the html code gets posted to the server and server generates the error. You can either call History.Back(or something like that in javascript) in your button click or you can set ValidateRequest = "True" Regards, Jim

      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