Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

pageValidate equivalent for ascx control?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
howboutafresca@gmail.com - 14 Dec 2007 22:15 GMT
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!
Michael Nemtsev [MVP] - 15 Dec 2007 07:00 GMT
Hello howboutafresca@gmail.com,

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
[quoted text clipped - 10 lines]
> before the page is submitted?  I can't find a way around my quandry,
> and any help is appreciated!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.