Author: 4ndsahin | Posted on: 9/16/2008 5:18:15 AM | Views : 292

Need Help,

i have this method


////////////////////////////////////////////////////////////////
public string CheckSignature(Stream fs, int signatureSize)
{
using (fs)
{
if (fs.Length 0)
{
int bytesRead = fs.Read(signature, index, signatureSize);
signatureSize -= bytesRead;
index += bytesRead;
}
fs.Dispose();

return BitConverter.ToString(signature);
}
}
////////////////////////////////////////////////////////////////

and i call CheckSignature as

//////////////////////////////////////////////////////////////
if (CheckSignature(MyFile.PostedFile.InputStream, 4) == "89-50-4E-47")//which is mean posted file is a "jpg"
{
//save MyFile to desired directory with desired name
}
///////////////////////////////////////////////////////////////

result of "if(CheckSignature(MyFile.PostedFil ...

Go to the complete details ...