how to access protected funtion variable into another func.
 protected void gvDetails_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Upload")
        {
            GridViewRow gvrow = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
            int rowIndex = gvrow.RowIndex;
            string txtFileName = ((TextBox)gvrow.FindControl("txtFileName")).Text;
            string txtContentType = ((TextBox)gvrow.FindControl("txtContentType")).Text;
            string txtBytes = ((TextBox)gvrow.FindControl("txtBytes")).Text;
            FileUpload FU = ((FileUpload)gvrow.FindControl("file1"));
            byte[] bytes = null;
            string filename = "";
            string contentType = "";
            if (FU.HasFile)
            {
                HttpFileCollection hfc = Request.Files;
                HttpPostedFile hpf = hfc[0];
                filename = Path.GetFileName(hpf.FileName);
                contentType = hpf.ContentType;
                using (Stream fs = hpf.InputStream)
                {
                    using (BinaryReader br = new BinaryReader(fs))
                    {
                        bytes = br.ReadBytes(Convert.ToInt32(fs.Length));
                    }
                }
                txtFileName = filename.ToString();
                txtContentType = contentType.ToString();
                txtBytes = bytes.ToString();
            }
        }
    }
 here i want to aceess the value of txtFileName, txtContentType and txtBytes...