Hi aassaahh,
Every thing is fine in your code. There are 2 condition
1.If you select anything in the
Browse Button then if you will click on the button it will do a post back as well as call the
btnUpload_Click method.
2.If you select nothing in the
Browse Button then if you will click on the button it will do nothing.
It is happening because you have used a
ValidationGroup="I" .
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
}
}