protected void Btcadastras_Click(object sender, EventArgs e)
    {
        //Colocando os valores no bean
        questao = new QuestaoBean();
        questao.Texto_questao = txtTextoquestao.InnerText;


        //Mandando para o controler
        questaocont = new QuestaoController();
        try
        {
            questaocont.InserirNovaQuestao(questao);
            pnCadastroQuestao.Visible  = false;
            btnPainelCadastrar.Visible = true;

            var listaQuestoes = questaocont.ListarQuestao();
            if (listaQuestoes != null)
            {
                this.grdDados.DataSource = listaQuestoes;
                this.grdDados.DataBind();
            }
        }
        catch (QuestaoInvalidaException)
        {
            Labelerro.Text = "Campo de texto é obrigatório";
        }
        catch (Exception)
        {
            throw;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //Verifica se o usuario está logado, se é Administrador e se ele está ativo
        try
        {
            if (Session["usuario"] == null || Session["UsuarioTipo"].ToString() != "A" || Session["UsuarioStatus"].ToString() != "A")
            {
                Response.Redirect("~/View/Home.aspx");
            }
        }
        catch
        {
            Response.Redirect("~/View/Home.aspx");
        }


        questaocont = new QuestaoController();
        if (!Page.IsPostBack)
        {
            var listaQuestoes = questaocont.ListarQuestao();
            if (listaQuestoes != null)
            {
                this.grdDados.DataSource = listaQuestoes;
                this.grdDados.DataBind();
            }
        }
    }