no suitable method found to override error on Asp.net -


i new asp.net. wrote 1 page of asp.net, when run it, following errors.

 public partial class issueofbook: system.web.ui.page  { public int64 sid; protected void page_load(object sender, eventargs e) {     string id;     id = request.querystring.get(0);      if (!(ispostback == true))     {         if (request.querystring.get(1) == "g")         {             sid = convert.toint64(id);             if (populatedrecord (sid ) == false)             {              }         }      }  }  private boolean populatedrecord(int64 id)    {     dataset ds;     ds = new dataset();     sqlcommand cmd = new sqlcommand();     sqldataadapter da = new sqldataadapter();     sqlconnection cnn = new sqlconnection();     string connectionstring;     connectionstring = @"datasource=devi\sqlexpress;intial catalog=librarymanagement;integrated security=sspi";     cnn.connectionstring = connectionstring;     if (cnn.state != connectionstate.open)         cnn.open();     cmd.connection = cnn;     cmd.commandtype = commandtype.storedprocedure;     cmd.commandtext = "usbinsertdatainto";     cmd.parameters.clear();     cmd.parameters.addwithvalue("@bookno", "no");     adp.selectcommand = cmd;     try     {         adp.fill(ds);     }     catch (exception ex)     {         throw new applicationexception(             "!!! error occured while update record in dtl_securitycapital_upload." + ex.message);         lblerror.visible = true;         lblerror.text = "!!! error occured while " + ex.message.tostring();         return false;     }     if (ds.tables[0].rows.count > 0)     {         txtno.text = ds.tables[0].rows[0]["bookno"].tostring();         txtstuno.text = ds.tables[0].rows[0]["studentno"].tostring();         radiobutton1.text = ds.tables[0].rows[0]["currentnoofcopiesavaillable"].tostring();         radiobutton2.text = ds.tables[0].rows[0]["currentnoofcopiesavaillable"].tostring();         txtdate.text = ds.tables[0].rows[0]["issuedate"].tostring();         txtddate.text = ds.tables[0].rows[0]["duedate"].tostring();     }     cmd.dispose();     cnn.close();     cnn.dispose();     return true; }  protected void button2_click(object sender, eventargs e) {     sqlconnection cnn = new sqlconnection();     string constr = null;     sqlcommand cmd = new sqlcommand();     constr = @"data source=devi\sqlexpress; initial catalog =librarymanagement; integrated security=sspi";     cnn.connectionstring =constr;     try     {         if (cnn.state != connectionstate.open)             cnn.open();     }     catch (exception ex)     {         string str1 = null;         str1 = ex.tostring();     }     cmd.connection = cnn;     cmd.commandtype = commandtype.storedprocedure;     cmd.commandtext = "uspinsertbookdatainto";     cmd.parameters.clear();     cmd.parameters.addwithvalue("@bookno", txtno.text);     cmd.parameters.addwithvalue("@studentno", txtstuno.text);     cmd.parameters.addwithvalue("@issuedate", txtdate.text);     cmd.parameters.addwithvalue("@duedate", txtddate.text);     if (radiobutton1.checked==true)     {         cmd.parameters.addwithvalue("@currentnoofcopiesavaillable", radiobutton1.text);     }     if (radiobutton2.checked == true)     {         cmd.parameters.addwithvalue("@currentnoofcopiesavaillable", radiobutton2.text);     }     try     {         cmd.executenonquery();     }     catch (exception ex)     {         throw new applicationexception("!!! error occured while insert record dtl_securitycapital_upload." + ex.message);         lblerror.visible = true;         lblerror.text = "!!! error occured while ." + ex.message.tostring();     }          {         cmd.dispose();     }     cnn.close();     lblerror.text = "new issue of record suceessfully!!";     txtno.text = "";     txtstuno.text = "";     txtdate.text = "";     txtddate.text = ""; } } 

description:

an error occurred during compilation of resource required service request. please review following specific error details , modify source code appropriately.

compiler error message:

cs0115: 'asp.issue_of_book_aspx.gettypehashcode()': no suitable method found override 

source error:

line 1253:         line 1254:        [system.diagnostics.debuggernonusercodeattribute()] line 1255:        public override int gettypehashcode() { line 1256:            return -853658727; line 1257:        } 

will guide me? thank you.

check article may

http://technage.blogspot.com/2008/05/error-gettypehashcode-no-suitable.html

as per observation inherit name means issue_of_book_aspx.cs , in code display name issueofbook vary's , raise error make sure .aspx , .aspx.cs name should same


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -