NEXT ObjExamProcess
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Student_ ObjExamProcess: System.Web.UI.Page
{
DBMgt objDBMgt = new DBMgt();
protected void Page_Load(object sender, EventArgs e)
{
NextQues();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
string strAnswer="";
if (RadioButton1.Checked)
strAnswer = "A";
else if (RadioButton2.Checked)
strAnswer = "B";
else if (RadioButton3.Checked)
strAnswer = "C";
else if(RadioButton4.Checked)
strAnswer = "D";
SqlParameter[] parList = new SqlParameter[3];
parList[0] = new SqlParameter("@iStuId ",Convert.ToInt16(Session["iStuId"]));
parList[1] = new SqlParameter("@iObjQusId", Convert.ToInt16(FormView1.DataKey.Value));
parList[2] = new SqlParameter("@chAns", strAnswer);
bool i = objDBMgt.ExecuteNonQueryStoreProc("insObjQAttempted", parList);
if (i == true)
lblMsg.Text = "Submitted!!!";
else
lblMsg.Text = "Not Submitted!!!";
NextQues();
}
catch (SqlException SqlEx) // This Catch block is used to Catch the Sql or Backend related Problem
{
lblMsg.Text = "Sorry for inconvenience!!!!<br>Following BackEnd related Error Occured: +'" + SqlEx.Message + "'<br>Try Again!!!";
}
catch (Exception ex) // This Block is used to catch any exception occured if not related to upper exception
{
lblMsg.Text = "Sorry for inconvenience!!!!<br>Following Error Occured: +'" + ex.Message + "'<br>Try Again!!!";
}
}
private void NextQues()
{
Random r = new Random();
FormView1.PageIndex = r.Next(FormView1.PageCount);
}
protected void btnSkip_Click(object sender, EventArgs e)
{
NextQues();
}
}
This site is designed to help BCA MCA student to develop final project and synopsis Download Free BCA Project, MCA Project, IT Projects, Final report and Project synopsis with Full documentation and code
Free download MCA projects in ASP.NET with complete source code, Free download MCA projects in VB,NET with complete source code, Free download MCA MSc projects in C#.net with complete source code,
Free download MCA projects in JAVA with complete source code, Free download MCA projects in PHP with complete source code, Free download BSc CS IT projects in PHP,JAVA, ASP.NET with source code
Computer Science Final Project , Free download MCA projects in asp.net , Free download MCA projects in vb.net, Free download MCA projects in C#.net, Free download MCA projects in java, Free download MCA projects in PHP