buddi.hemanthkumar 0 Newbie Poster

i need help to create website for online test using asp.net with c# coding..
it shld consists of question with multiple answer choices, i ve created using panel control and when i compiled application , the next button is not working,its not taking me to 2 nd question

 protected void Page_Load(object sender, EventArgs e)
        {
            pnl1.Visible = true;
            pnl2.Visible = false;
            pnl3.Visible = false;
            pnl4.Visible = false;
            pnl5.Visible = false;

        }


        protected void btnNext_Click(object sender, EventArgs e)
        {
            ViewState["QuestionNumber"] = 2;
            if(ViewState["QuestionNumber"] == "2")
            {
                pnl2.Visible = true;
                pnl3.Visible = false;
                pnl4.Visible = false;
                pnl5.Visible = false;
                ViewState["QuestionNumber"] = 3;
            }
            if( ViewState["QuestionNumber"] == "3")
            {
                pnl3.Visible=true;
                pnl4.Visible=false;
                pnl5.Visible=false;
                ViewState["QuestionNumber"]=4;
            }
            if(ViewState["QuestionNumber"] == "4")
            {
                pnl4.Visible=true;
                pnl5.Visible=false;
                ViewState["QuestionNumber"]=5;
            }
            if (ViewState["QuestionNumber"] == "5")
            {
                pnl5.Visible=true;

            }
            else
            {
                 pnl1.Enabled=false;
            }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.