dopanel, this will replace all instances (if any) of the forbidden characters which is nto what he needs (i am pretty sure about it).
Imagine you sign up using one of these chars in your username but now your username is not what you expect.
He must prevent the bad characters instead replacing them. As mentioned, RegularExpressionValidator is best way for that.
dopanel, this will replace all instances (if any) of the forbidden characters which is nto what he needs (i am pretty sure about it).
Imagine you sign up using one of these chars in your username but now your username is not what you expect.
He must prevent the bad characters instead replacing them. As mentioned, RegularExpressionValidator is best way for that.
Hmmmm
My function can't be used in some area,but if the field is like a username ,i think he must using javascript instead to alert the error message ,and user can modify to the correct format.
Exactly ... the RegularExpressionValidator will alert you if the expression doesn't match .. and yes it is using client-side code (javascript) for that. However you don't need to code anything .. just drag and drop and set which control to be validate. Pretty str8 forward!
<%
Dim CATEGORIES
Dim CATEGORIES_cmd
Dim CATEGORIES_numRows
Set CATEGORIES_cmd = Server.CreateObject ("ADODB.Command")
CATEGORIES_cmd.ActiveConnection = MM_recrutanet_STRING
CATEGORIES_cmd.CommandText = "SELECT CATEGORY, COUNT(*) as COUNT FROM dbo.JOB GROUP BY CATEGORY ORDER BY COUNT DESC"
CATEGORIES_cmd.Prepared = true
Set CATEGORIES = CATEGORIES_cmd.Execute
CATEGORIES_numRows = 0%>
Hi Harish, may we know, how this code prevents the unwanted characters?
It only retrieves the Category from the Job table and has nothing to do with preventing odd chars in a textbox. I've noticed that almost all your posts are non-related to the original question.