c# - CS1002 Error in ASP.NET Page -


can me kind of error?

description: error occurred during compilation of resource required service request. please review following specific error details , modify source code appropriately.   compiler error message: cs1002: ; expected 

this seems cause error:

line 69:                    string code = grdviews.datakeys[index].value.tostring(); line 70:                      line 71:                        ienumerable<datarow> query = in dt.asenumerable()where i.field<string>("code").equals(code)select i; line 72:                        datatable detailtable = query.copytodatatable<datarow>(); line 73:                         detailsview1.datasource = detailtable; 

this sourcecode:

protected void grdviews_rowcommand(object sender, gridviewcommandeventargs e) {      if(e.commandname.equals("detail"))      {          int index = convert.toint32(e.commandargument);          string code = grdviews.datakeys[index].value.tostring();           ienumerable<datarow> query = in dt.asenumerable()where i.field<string>("code").equals(code)select i;          datatable detailtable = query.copytodatatable<datarow>();              detailsview1.datasource = detailtable;          detailsview1.databind();          system.text.stringbuilder sb = new system.text.stringbuilder();          sb.append(@"<script type='text/javascript'>");          sb.append("$('#currentdetail').modal('show');");          sb.append(@"</script>");          scriptmanager.registerclientscriptblock(this, this.gettype(),                                "modalscript", sb.tostring(), false);      } } 

the line

ienumerable<datarow> query =      in dt.asenumerable()where i.field<string>("code").equals(code)select i; 

is not valid. need spaces in between statements, so:

ienumerable<datarow> query =      in dt.asenumerable()     i.field<string>("code").equals(code)     select i; 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -