c# - Error Message: Type or namespace definition, or end-of-file expected -
i've searched internet, previous answers said semicolon missing. that's not problem. else can cause error? in third site, several people asked question scenario different.
error > type or namespace definition, or end-of-file expected
public partial class seensms : system.web.ui.usercontrol { //temp sql connection //public sqlconnection mycon; sqlconnection mycon = new sqlconnection(@"data source=asoft20\mamut;initial catalog=viltranew;userid=sa;password=sa123"); protected void page_load(object sender, eventargs e) { string[] msg_arr = request.querystring["arr"].split('|'); if (!ispostback) { string moose = request.querystring[1]; } if (msg_arr != null) { if ((msg_arr.length == 3) && (msg_arr[1].tolower() == "slett")) { int hours = convert.toint32(msg_arr[2]); if (hours > 0) { string username = msg_arr[0]; sqlcommand com = new sqlcommand("select count(*) count animal hours=@hours", mycon); com.parameters.addwithvalue("@hours",hours); using (sqldatareader reader = com.executereader()) { if(reader.hasrows) { while (reader.read()) { // int number = convert.toint32(con.executereader()); int number = convert.toint32(reader["count"]); } } else{ } } } // if( number == 0) // { // response.write("improper plain summaries."); // } // else { } } } } public bool number { get; set; } public object hours { get; set; }} // public system.collections.specialized.namevaluecollection moose { get; set; } // public string value { get; set; } // public object msg_arr { get; set; } } }
this line:
public object hours { get; set; }}
your have redundand }
@ end
Comments
Post a Comment