Click here to Skip to main content
15,889,595 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTroubles with calling a PageMethod from javascript [solved] Pin
Calla25-Mar-12 23:07
Calla25-Mar-12 23:07 
AnswerRe: Troubles with calling a PageMethod from javascript Pin
Calla26-Mar-12 20:51
Calla26-Mar-12 20:51 
Questioncause of these errors? Pin
ozturkmuhammed24-Mar-12 12:11
ozturkmuhammed24-Mar-12 12:11 
AnswerRe: cause of these errors? Pin
Eddy Vluggen25-Mar-12 3:34
professionalEddy Vluggen25-Mar-12 3:34 
QuestionUpdatePanel with dropdown control. Pin
vipinkrr24-Mar-12 6:22
vipinkrr24-Mar-12 6:22 
AnswerRe: UpdatePanel with dropdown control. Pin
Abhinav S24-Mar-12 16:31
Abhinav S24-Mar-12 16:31 
AnswerRe: UpdatePanel with dropdown control. Pin
MaulikDusara26-Mar-12 2:55
MaulikDusara26-Mar-12 2:55 
Questionquiz application Pin
daya patel24-Mar-12 5:24
daya patel24-Mar-12 5:24 
i have one problem when in inserting data into the database .when user start quiz then after press next button ,at that time whatever user selecting is store in one database but actually is not stored i used detaillist view to display quiz question.



quiz.aspx.cs code is:

 <br />
<br />
protected void Button1_Click1(object sender, EventArgs e)<br />
    {<br />
       <br />
<br />
        // Save off previous answers<br />
        System.Data.DataRowView dr = (System.Data.DataRowView)DetailsView1.DataItem;<br />
<br />
        // Create Answer object to save values<br />
        Answer a = new Answer();<br />
        a.QuestionID = dr["QuestionID"].ToString();<br />
        a.CorrectAnswer = dr["CorrectAnswer"].ToString();<br />
<br />
        if (RadioButton1.Checked == true)<br />
        {<br />
            crropt = "option1";<br />
        }<br />
        else if (RadioButton2.Checked == true)<br />
        {<br />
            crropt = "option2";<br />
        }<br />
        else if (RadioButton3.Checked == true)<br />
        {<br />
            crropt = "option3";<br />
        }<br />
        else if (RadioButton4.Checked == true)<br />
        {<br />
            crropt = "option4";<br />
        }<br />
        a.UserAnswer = crropt;<br />
<br />
        ArrayList al = (ArrayList)Session["AnswerList"];<br />
        al.Add(a);<br />
<br />
        Session.Add("AnswerList", al);<br />
<br />
        if (DetailsView1.PageIndex == DetailsView1.PageCount - 1)<br />
        {<br />
            // Go to evaluate answers<br />
            Response.Redirect("evaluate.aspx");<br />
        }<br />
        else<br />
        {<br />
            DetailsView1.PageIndex++;<br />
            Button1.Text = "Finished";<br />
        }<br />




and i get error like:
Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'Answer' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 79:
Line 80: // Create Answer object to save values
Line 81: Answer a = new Answer();
Line 82: a.QuestionID = dr["QuestionID"].ToString();
Line 83: a.CorrectAnswer = dr["CorrectAnswer"].ToString();
AnswerRe: quiz application Pin
Abhinav S24-Mar-12 16:28
Abhinav S24-Mar-12 16:28 
Questionpaging in gridview? Pin
murali_utr23-Mar-12 23:47
murali_utr23-Mar-12 23:47 
AnswerRe: paging in gridview? Pin
murali_utr23-Mar-12 23:56
murali_utr23-Mar-12 23:56 
QuestionAutoCompleteExtender in AjaxToolkit? Pin
murali_utr23-Mar-12 23:36
murali_utr23-Mar-12 23:36 
AnswerRe: AutoCompleteExtender in AjaxToolkit? Pin
murali_utr26-Mar-12 4:01
murali_utr26-Mar-12 4:01 
QuestionNeed of asp.net code for offered courses Pin
Shazia Nawaz23-Mar-12 21:21
Shazia Nawaz23-Mar-12 21:21 
AnswerRe: Need of asp.net code for offered courses Pin
Abhinav S24-Mar-12 0:13
Abhinav S24-Mar-12 0:13 
AnswerRe: Need of asp.net code for offered courses Pin
Shivapragasam24-Mar-12 2:27
Shivapragasam24-Mar-12 2:27 
GeneralRe: Need of asp.net code for offered courses Pin
Shazia Nawaz24-Mar-12 23:36
Shazia Nawaz24-Mar-12 23:36 
GeneralRe: Need of asp.net code for offered courses Pin
shreekar27-Mar-12 9:37
shreekar27-Mar-12 9:37 
Questionmaster page problem Pin
Elham M23-Mar-12 7:24
Elham M23-Mar-12 7:24 
AnswerRe: master page problem Pin
Dalek Dave23-Mar-12 14:08
professionalDalek Dave23-Mar-12 14:08 
GeneralRe: master page problem Pin
Elham M28-Mar-12 23:54
Elham M28-Mar-12 23:54 
GeneralRe: master page problem Pin
Dalek Dave29-Mar-12 0:38
professionalDalek Dave29-Mar-12 0:38 
AnswerRe: master page problem Pin
Anudeep Jaiswal - MCA28-Mar-12 23:01
Anudeep Jaiswal - MCA28-Mar-12 23:01 
GeneralRe: master page problem Pin
Elham M29-Mar-12 0:20
Elham M29-Mar-12 0:20 
QuestionPage not found Pin
Dalek Dave23-Mar-12 4:29
professionalDalek Dave23-Mar-12 4:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.