public string Decryptdata(string imagepath)
{
string image = "";
if (imagepath != "")
{
string[] path = { "" };
path = imagepath.Split('/');
string baseurl = path[0];
string filename = path[1];
string[] withextention = { "" };
withextention = filename.Split('.');
string encryptpwd = withextention[0];
string extention = withextention[1];
string decryptpwd = string.Empty;
UTF8Encoding encodepwd = new UTF8Encoding();
Decoder Decode = encodepwd.GetDecoder();
byte[] todecode_byte = Convert.FromBase64String(encryptpwd);
int charCount = Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
char[] decoded_char = new char[charCount];
Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
decryptpwd = new String(decoded_char);
image = baseurl + "/" + decryptpwd + "." + extention;
}
else
{
image = "~/Users/Images/Chrysanthemum.jpg";
}
return image;
}