6 Replies - 2542 Views - Last Post: 27 January 2012 - 10:29 PM Rate Topic: -----

#1 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 09:15 PM

Hi everyone,
I was wondering if there is a way that I can accept HTML input in my site since I want to be able to have the user generate simple html documents that are stored temporarily on the server. My problem is that I am unable to accept input like that in ASP.NET sites. Is there a property that is applied to the page that I can use?
Thanks in advance,
-Yo!
Is This A Good Question/Topic? 0
  • +

Replies To: Accept HTML input in textbox - Any .Net language

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9277
  • View blog
  • Posts: 34,780
  • Joined: 12-June 08

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 09:19 PM

Quote

My problem is that I am unable to accept input like that in ASP.NET sites.

What do you mean? Are you talking about the big ol' ass warning .NET gives you about possibly malicious code?
Was This Post Helpful? 0
  • +
  • -

#3 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 09:23 PM

Yep, I want to be able to have clients type custom html code(of any sort) into the web app. I am unsure on how to accept the html input from the user and I would really appreciate any help I could get.
Sincerely,
-Yo!
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9277
  • View blog
  • Posts: 34,780
  • Joined: 12-June 08

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 09:25 PM

So.. you *ARE* getting the error message, or are you getting something else?
Was This Post Helpful? 0
  • +
  • -

#5 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 09:28 PM

A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$TextBox1="<div />"). 


Just an example of the error

This post has been edited by Yo!: 27 January 2012 - 09:29 PM

Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9277
  • View blog
  • Posts: 34,780
  • Joined: 12-June 08

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 10:18 PM

It's against my better judgement, but the only option is to go out of your way to turn off the validation request. This is a very, very, *VERY* bad idea. It leaves your site, your box, and possibly your network open to being shredded. That warning is there to prevent you from doing something, and I quote Lt. Daniel Kaffee, "galactically stupid".

Yes, this is the only direct way of doing this. Yes this only applies to the page you are using, but that is enough to run the mile with.

http://www.asp.net/w...uest-validation
Was This Post Helpful? 2
  • +
  • -

#7 Yo!  Icon User is offline

  • D.I.C Head


Reputation: 4
  • View blog
  • Posts: 83
  • Joined: 03-September 11

Re: Accept HTML input in textbox - Any .Net language

Posted 27 January 2012 - 10:29 PM

Oh that kinda sucks, oh well, I guess I can write a Javascript script to replace the html with some special stuff I guess. Thank you very much! I really do appreciate it.
-Yo!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1