.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

I have a problem to write the code for question paper in an online examination and for result page

Posted By: teja     Posted Date: February 20, 2013    Points:5   Category :ASP.Net
Hi,am working as a developer for the project "Online examination".
Actually For online examination,in exam paper i have design the gridview for displaying questions with multiple choice,which means we have 30 questions in exam paper,and each question contain 4 options with radio buttons.my question is how to write the code for that page,and how to calculate the marks for each question,because each question having different different options.so can any one tell me the code for this,because am new to ASp.NET,C#.NET

Responses
Author: Amit Mehra             
Posted Date: February 21, 2013     Points: 20   

Hi,

Since your requirment is big and I wold suggest you to use repeater control instead of gridview.

and while doing this project if you face any problem you can ask one by one in this forum we can help you on this. So 1st start with replacing gridview with Repeater control.

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: teja             
Posted Date: February 22, 2013     Points: 20   

Hi Amit,
Thanks for your suggestion.and i have another doubt,that is can i use file upload control for adding questions in online examination.if i upload question paper(created using html),then how can that file will store into database,and can we retrieve that question paper from database to display the questions in another page.can you please clarify my doubt?

Author: Amit Mehra             
Posted Date: February 22, 2013     Points: 20   

Hi,

Instead of storing html file store its html content. and you can retrieve the html content from DB and using Response.Write( ) method you can write whole html content. (however its not good approach to store html content or html file in database for your requirement.)

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: teja             
Posted Date: February 22, 2013     Points: 20   

Hi,
How should i store html content into database,and how can i retrieve it by database.if you don't mind,can you please tell me the code,because am new to developing side.





Thanks & Regards,
Teja


Author: teja             
Posted Date: February 25, 2013     Points: 20   

Hi,can any one please send me the code for how to upload the file into database and how to retrieve that uploaded file from database

Author: teja             
Posted Date: February 25, 2013     Points: 20   

->My problem is for uploading file,file was not uploaded,can any one correct my code?



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.SessionState;
using System.Data.SqlTypes;

namespace web
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void UploadButton_Click(object sender, EventArgs e)
{

if (FileUpload1.HasFile)
{
try
{
if (FileUpload1.PostedFile.ContentType == "application/msword")
{
if (FileUpload1.PostedFile.ContentLength < 102400)
{
string filename = System.IO.Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath("E:\\pratyusha\\ebApplication3\\web\\web\\Data\\" + FileUpload1.FileName));
;
Label1.Text = "Upload status: File uploaded!";
}
else
Label1.Text = "Upload status: The file has to be less than 100 kb!";
}
else
Label1.Text = "Upload status: Only doc files are accepted!";
}
catch (Exception ex)
{
Label1.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
}


}
}
}






Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend