c# - Convert Base64 string to image and save it -
i want save base64 image folder in application, have problem in code. gives error below, message = "invalid length base-64 char array or string." in code; public static string updateuser(int refuser, string name, string surname,string base64) { string result = "failed"; var photo = ""; if (base64!=null && base64!="") { string mediapath = extend.getxmlconfigparameter("media", "path")+"user\\"; string medianame = guid.newguid().tostring(); base64 = base64.replace("data:image/png;base64,", ""); base64 = base64.replace("data:image/jpg;base64,", ""); base64 = base64.replace("data:image/gif;base64,", ""); base64 = base64.replace("data:image/jpeg;base64,", ""); ...