hi there
i cureently do this:
string test = !string.IsNullOrEmpty(txtTest.Text) ? secure.cleanUp(txtTest.Text) : null;
and same for dropdown values, however i want to put this all in a function so i can go:
string test = getStringByRef(txtTest,null)
but i cant work out how to pass over the object when it may be a textbox, dropdownlist, checkbox etc
i did this:
public String getStringValueRef(ref object formitem, string defaultvalue)
{
return !string.IsNullOrEmpty(formitem.Text) ? secure.cleanUp(formitem.Text) : defaultvalue;
} but that wont work as it is just an empty object, (this will be in a baseclass).
so what do you guys reckon, is there a way to detect what i have and how to get its value
maybe in a select ca ...
Go to the complete details ...