I am recieving the following errors:
Quote
error CS1513: } expected
error CS1022: Type or namespace definition, or end-of-file expected
error CS1022: Type or namespace definition, or end-of-file expected
Seem straight forward, but for the life of me I cant see the problem. There is a matching brace for the opening one. Seems these two errors go hand in hand from what I have read.
Microsft mentions about volatile variables can cause this, but I dont use any of those. Mentions moving the #endregion directive'}'. I did and no-surprise, it didnt change anything.
Here is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
namespace Hultin
{
public partial class _orderform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ [COLOR="Red"]// error CS1513: } expected[/COLOR]
void annoyDropDown() {
if (!IsPostBack) {
ArrayList values = new ArrayList();
values.Add ("not really");
values.Add ("kind of");
values.Add ("really");
values.Add ("extremely");
AnnoyDropDown.DataSource = values;
AnnoyDropDown.DataBind();
} // end if () {
} // end annoyDropDown
void SubmitBtn_Click(Object sender, EventArgs e) {
Label1.Text = "This form started to : " + AnnoyDropDown.SelectedItem.Text + " annoy you.";
} // end annoy drop down list
void surveyDropDown () {
if (!IsPostBack) {
ArrayList values = new ArrayList();
values.Add ("oh yes!");
values.Add ("is there any prizes?");
values.Add ("no thanks");
values.Add ("are you kidding!?");
SurveyDropDown.DataSource = values;
SurveyDropDown.DataBind();
}
} // end surveyDropDown ()
void SubmitBtn_Click(Object sender, EventArgs e) {
Label2.Text = "When asked if you wanted to take a survey, you responded with: " + SurveyDropDown.SelectedItem.Text + " annoy you.";
} // end survey drop down list
}
}
} [COLOR="Red"]// error CS1022: Type or namespace definition[/COLOR]
I appreciate the help


Sign In
Create Account

Back to top









