Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > pageValidate equivalent for ascx control?

Reply
Thread Tools

pageValidate equivalent for ascx control?

 
 
howboutafresca@gmail.com
Guest
Posts: n/a
 
      12-14-2007
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!
 
Reply With Quote
 
 
 
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      12-15-2007
Hello http://www.velocityreviews.com/forums/(E-Mail 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


> 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!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TabStrip/Multipage using UserControl (.ascx) contained within a UserControl(.ascx) shaileenpatel@yahoo.com ASP .Net Web Controls 2 05-03-2005 05:01 PM
Multiple *.ascx files with a single *.ascx.cs in VS.NET 2003 Holger (David) Wagner ASP .Net 2 07-03-2004 09:23 AM
datasource of child .ascx not visible to parent .ascx Joe ASP .Net Web Controls 1 02-16-2004 07:27 AM
can a dg be added to an ascx? ascx call a ws? Jason Shohet ASP .Net 1 11-10-2003 07:08 PM
[ASCX] Add an ascx in a webcontrol... Quentin ASP .Net 1 07-29-2003 07:37 PM



Advertisments