On 25 Apr, 14:36, Phil Carmody <thefatphil_demun...@yahoo.co.uk>
wrote:
> Emma <E...@excalvehs.demon.co.uk> writes:
> > Stavros <gspow...@gmail . com > wrote:
> >>Hello, I've created an F1 quiz on my blog to test you great F1 minds.
>
> > 7 out of 8 for me, didn't get the first one right.
>
> Well, I wouldn't say I got the first one either right or wrong.
> I got the shoddily-written web application's knickers in a twist
> instead.
>
> """
> Server Error in '/' Application.
> Object reference not set to an instance of an object.
> Description: An unhandled exception occurred during the execution of the c=
urrent web request. Please review the stack trace for more information about=
the error and where it originated in the code.
>
> Exception Details: System.NullReferenceException: Object reference not set=
to an instance of an object.
>
> Source Error:
>
> Line 51:
> Line 52: results = (Hashtable)Session["results"]=
;
> Line 53: right = int.Parse(Session["right"].ToSt=
ring());
> Line 54:
> Line 55: if (results[questionNumber].ToString() =
== selected.SelectedValue.ToString())
>
> Source File: e:\HostingSpaces\gregor.spow...@massmediadesign.co.uk\massmed=
iadesign.co.uk\w w w root\Quiz.aspx.cs Line: 53
>
> Stack Trace:
>
> [NullReferenceException: Object reference not set to an instance of an obj=
ect.]
> Quiz.btnNext_Click(Object sender, EventArgs e) in e:\HostingSpaces\=
gregor.spow...@massmediadesign.co.uk\massmediadesign.co.uk\w w w root\Quiz.aspx=
.cs:53
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
> System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArg=
ument) +107
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandle=
r.RaisePostBackEvent(String eventArgument) +7
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceC=
ontrol, String eventArgument) +11
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)=
+33
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAs=
yncPoint, Boolean includeStagesAfterAsyncPoint) +1746
>
> Version Information: Microsoft . net Framework Version:2.0.50727.1433; ASP.=
NET Version:2.0.50727.1433
>
> """
>
> Ho hum. I score 0/0. NaN.
>
> Phil
> --
> Dear aunt, let's set so double the killer delete select all.
> -- Microsoft voice recognition live demonstration
Oh dear. You get bonus points for that one!
I'll sort it out - sorry bout that!