pageValidate equivalent for ascx control?

H

howboutafresca

I'm in a bit of a pickle. I'm dealing with a web portal that uses a
single aspx file at the top, which dynamically loads ascx controls
into it. On one of these controls I have a textbox that I'd like to
enter html codes into.

Problem-- every time I try submitting the page I get the warning
message that I may be posting unsafe data. I'd like to set things so
there is no validation from the ascx file. I cannot set the
pageValidate attribute, because it's an ascx file I'm dealing with and
I don't want to set that for what amounts to the entire portal.

I'm using .Net 1.1. Is there a way to at least htmlencode my textbox
before the page is submitted? I can't find a way around my quandry,
and any help is appreciated!
 
M

Michael Nemtsev [MVP]

Hello (e-mail address removed),

could you post the exact error u get?

I suppose it's because your html, which u are trying to insert is not encoded.
I'd try to use HttpUtility.HtmlEncode to encode insterted text

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top