NEXT Expert_SendObjQues
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 Expert_SendObjQues: System.Web.UI.Page
{
DBMgt objDBMgt = new DBMgt();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSend_Click(object sender, EventArgs e)
{
try
{
string strCorrectOption = "";
if (RadioButton1.Checked)
strCorrectOption = txtxOptionA.Text.Trim();
else if (RadioButton2.Checked)
strCorrectOption = txtxOptionB.Text.Trim();
else if (RadioButton3.Checked)
strCorrectOption = txtxOptionC.Text.Trim();
else if (RadioButton4.Checked)
strCorrectOption = txtxOptionD.Text.Trim();
SqlParameter[] parList = new SqlParameter[8];
parList[0] = new SqlParameter("@iExId", Convert.ToInt16(Session["iExpertID"]));
parList[1] = new SqlParameter("@tObjQus", txtObjQues.Text.Trim());
parList[2] = new SqlParameter("@cOptionA", txtxOptionA.Text.Trim());
parList[3] = new SqlParameter("@cOptionB", txtxOptionB.Text.Trim());
parList[4] = new SqlParameter("@cOptionC", txtxOptionC.Text.Trim());
parList[5] = new SqlParameter("@cOptionD", txtxOptionD.Text.Trim());
parList[6] = new SqlParameter("@cAns", strCorrectOption);
parList[7] = new SqlParameter("@bStatus", false);
bool i = objDBMgt.ExecuteNonQueryStoreProc("insObjQues", parList);
if (i == true)
lblMsg.Text = "New Question Sent!!!";
else
lblMsg.Text = "Question Not Sent!!!";
}
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!!!";
}
}
}
SendSubjQues
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 Expert_ SendSubjQues : System.Web.UI.Page
{
DBMgt objDBMgt = new DBMgt();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnInsert_Click(object sender, EventArgs e)
{
try
{
SqlParameter[] parList = new SqlParameter[5];
parList[0] = new SqlParameter("@iExId", Convert.ToInt16(Session["iExpertID"]));
parList[1] = new SqlParameter("@tQus", txtSubQus.Text.Trim());
parList[2] = new SqlParameter("@tAns", txtCorreAns.Text.Trim());
parList[3] = new SqlParameter("@iMaxMarks", Convert.ToInt16(txtMaxMarks.Text.Trim()));
parList[4] = new SqlParameter("@bStatus", false);
bool i = objDBMgt.ExecuteNonQueryStoreProc("insSubQues", parList);
if (i == true)
lblMsg.Text = "New Question Sent!!!";
else
lblMsg.Text = "Question Not Sent!!!";
}
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!!!";
}
}
}
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