Click here to Skip to main content
16,007,472 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: App_Code annoyance Pin
Not Active20-Jun-07 9:15
mentorNot Active20-Jun-07 9:15 
GeneralRe: App_Code annoyance Pin
Not Active20-Jun-07 9:24
mentorNot Active20-Jun-07 9:24 
GeneralRe: App_Code annoyance Pin
gantww20-Jun-07 9:30
gantww20-Jun-07 9:30 
GeneralRe: App_Code annoyance Pin
gantww20-Jun-07 9:45
gantww20-Jun-07 9:45 
GeneralRe: App_Code annoyance Pin
gantww20-Jun-07 10:28
gantww20-Jun-07 10:28 
Questioncrystal reports Pin
teddddddddddd20-Jun-07 8:30
teddddddddddd20-Jun-07 8:30 
AnswerRe: crystal reports Pin
Sathesh Sakthivel20-Jun-07 9:01
Sathesh Sakthivel20-Jun-07 9:01 
Questiona type can not be used as an expression Pin
ASPnoob20-Jun-07 7:21
ASPnoob20-Jun-07 7:21 
Hi, I've found the function below when I was searching for ways to prevent SQL Injection. Basically it is supposed to remove the words select, drop, inser, delete, and other characters that can affect your database. I'm new to VB.NET and ASP.NET so please bear with me.

function killChars(strWords)
dim badChars
dim newChars

badChars = array("select", "drop", ";", "--", "insert", "delete", "xp_")
newChars = strWords

for i = 0 to uBound(badChars)
newChars = replace(newChars, badChars(i), "")
next

killChars = newChars

end function 


I get the error message "array is a type and can not be used as an expression". I also noticed that the datatype for the variables badChar and newChars were not specified and VS2003 says the variable "i" in the for loop was not declared. I have seen vb.net For loops used the way its being used in the function above without generating errors. Please help clarify, thank you in advance for your help.
AnswerRe: a type can not be used as an expression Pin
Not Active20-Jun-07 7:40
mentorNot Active20-Jun-07 7:40 
AnswerRe: a type can not be used as an expression Pin
Sathesh Sakthivel20-Jun-07 9:06
Sathesh Sakthivel20-Jun-07 9:06 
GeneralRe: a type can not be used as an expression Pin
Not Active20-Jun-07 9:09
mentorNot Active20-Jun-07 9:09 
GeneralRe: a type can not be used as an expression Pin
Christian Graus20-Jun-07 12:36
protectorChristian Graus20-Jun-07 12:36 
QuestionServer Error in '/' Application. Pin
Amr M. K.20-Jun-07 6:53
Amr M. K.20-Jun-07 6:53 
AnswerRe: Server Error in '/' Application. Pin
badgrs20-Jun-07 7:19
badgrs20-Jun-07 7:19 
QuestionCannot find Server or DNS Error Pin
BGadhia20-Jun-07 6:34
BGadhia20-Jun-07 6:34 
AnswerRe: Cannot find Server or DNS Error Pin
badgrs20-Jun-07 7:17
badgrs20-Jun-07 7:17 
GeneralRe: Cannot find Server or DNS Error Pin
BGadhia20-Jun-07 7:46
BGadhia20-Jun-07 7:46 
QuestionPlease Help with a Web Service! Pin
BigBlueEye20-Jun-07 6:08
BigBlueEye20-Jun-07 6:08 
QuestionCan't access functions Pin
MartyExodus20-Jun-07 5:30
MartyExodus20-Jun-07 5:30 
AnswerRe: Can't access functions Pin
Not Active20-Jun-07 6:05
mentorNot Active20-Jun-07 6:05 
NewsRe: Can't access functions Pin
MartyExodus20-Jun-07 6:27
MartyExodus20-Jun-07 6:27 
QuestionShift-Click: trap/prevent opening new browser - possible? Pin
Yab (Yet Another Bob)20-Jun-07 5:21
Yab (Yet Another Bob)20-Jun-07 5:21 
Questionabout popup window Pin
mredaghaly20-Jun-07 5:08
mredaghaly20-Jun-07 5:08 
QuestionPopup calendar Maser Page Pin
kjosh20-Jun-07 5:06
kjosh20-Jun-07 5:06 
QuestionHow do I make my DLL available on remote Server?? Pin
Cfer8320-Jun-07 5:05
Cfer8320-Jun-07 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.