Foros del Web » Programación para mayores de 30 ;) » .NET »

Evitar el error al insertar Html en un texbox ?

Estas en el tema de Evitar el error al insertar Html en un texbox ? en el foro de .NET en Foros del Web. Hola amigos.. sucede que tengo un formulario donde necesito recojer datos html y guardarlos en la bd.. pero asp.net marka error por que lo que ...
  #1 (permalink)  
Antiguo 15/09/2004, 20:31
 
Fecha de Ingreso: mayo-2004
Ubicación: Guadalajara, Jalisco, México
Mensajes: 724
Antigüedad: 19 años, 11 meses
Puntos: 6
Evitar el error al insertar Html en un texbox ?

Hola amigos.. sucede que tengo un formulario donde necesito recojer datos html y guardarlos en la bd..

pero asp.net marka error por que lo que se envia son tags html..

Para pobrar lo que digo hagan esto:
Creen un nuevo proyecto o simplemente haganlo en una pagina que ya tengan..

Agregen un texbox a la pagina y un boton... ejecuten... y metan <table> al contenido del texbox,, y presionen enter...

asp.net les madara un error, como evito eso?

A potentially dangerous Request.Form value was detected from the client (Ctrl_Razas1:txtRaza="<table>").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (Ctrl_Razas1:txtRaza="<table>").

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

De hecho ya intente con el
validateRequest=false

pero no jala.. sera por que mi texbox esta en un user control ? alguien sabe?
  #2 (permalink)  
Antiguo 16/09/2004, 01:08
 
Fecha de Ingreso: marzo-2004
Ubicación: Valencia
Mensajes: 367
Antigüedad: 20 años, 1 mes
Puntos: 1
Échale un vistazo a este post Stream:
http://www.forosdelweb.com/f29/request-form-posible-valor-peligroso-219992/

Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:10.