how does one do validation using asp.net validator controls with fckeditor?
or whats the easy simple way to validate that there is some input in the fckeditor for someone like me who is not so much javascript savy?
Marc.
or whats the easy simple way to validate that there is some input in the fckeditor for someone like me who is not so much javascript savy?
Marc.
Re: Validation in .net?
Re: Validation in .net?
your reply is facinating because it talks about something I had not even considered yet. How do I switch between allowing 1 type of content or another?
I was actualy only asking about validating that a user entered some input into the editor. (Required field) I still need top know that but also want to know about the other thing you talk about. mainly just how can I setup for simple forum posts. so it needs to validate that the user entered something and also it needs to restrict the content like you say. I dont know how to do that and given the lack of documentation here.......
Re: Validation in .net?
I use JavaScript integration and don't know if this would work, but I expect RequiredFieldValidator should work if used against the original textarea. Have you tried it?
http://www.w3schools.com/aspnet/control ... idator.asp
You can also do it the good-old way - when you receive the response, you can check that it's empty and generate the same page back, along with existing fields that were populated.
As for the other validation types, you can do quick and dirty regex search for, say, <script and such, but you may misidentify some things in HTML comments, etc, because regex doesn't know the HTML context you are in.
XSL is another way to go, since XSL/XML does all parsing for you and you just control what tags are allowed. However, there are a couple of gotchas there - if you use XSL, you cannot use most of character entities, like † or € and will have to configure FCKeditor to output them as numeric references, like † or €, respectively.