I have a form that submits a value. I need to perform several calculations on this value so I Dim it from the start. e.g. Dim MyValue MyValue = request.form("MyValue") Code (markup): Trouble is I need to call a function to strip rogue characters from it. Call StripChar(MyValue) Code (markup): Is there a simple way to dim this so i don't have to repeatedly use Call StripChar(MyValue) each time i refer to it? Dim MyValue MyValue = Call StripSpecialChar(MyValue) Code (markup): Doesn't work... Thanks!
If it is a function you should not be using the Call statement. Try: Dim MyValue MyValue = request.form("MyValue") MyValue = StripSpecialChar(MyVaue) Code (markup):
Yeah, no need for call: Dim MyValue MyValue = StripSpecialChar(request.form("MyValue")) Code (markup): And you do have to reference the function each time.