>Yes, just do a direct cast to "int" instead of converting it to a string, then back into an int.
>
>Replace this:
>
>
>int.Parse(dsx.Tables[0].Rows[0]["udfc1txtbxloc"].ToString())
>
>
>With
>
>
>(int) dsx.Tables[0].Rows[0]["udfc1txtbxloc"]
>
It may fail if the value returned is DbNull.Value
If it's not broken, fix it until it is.
My Blog