Hello,

I have a datagrid with 2 columns.Both the columns have textboxes where user will enter data.And at the end of the grid there will be button in insert all the data into the table.
I have user xml variable in my stored procedure.

In the gridview I have kept autogenerated false

<asp:gridview id="dgItem" runat="server" autogeneratecolumns="False" height="160px" allowpaging="true" showfooter ="true">

This is what I have written in the C# code and its giving me error.
Please help me in this.

protected void btnsubmit_Click(object sender, EventArgs e) {

        int schemaid;

        schemaid = tocheaderstyle.InsertTOCNumberingSchema(txtname.Text);
       
        String xmlList = GetList();
        
        tocheaderstyle.InsertTOCCounterStyle(schemaid,xmlList);
        
    

        }
    private String GetList() {
        XmlDocument doc = new XmlDocument();
        XmlElement elem = doc.CreateElement("xmlList");
        doc.AppendChild(elem);
        
        XmlElement root = doc.DocumentElement;


        for (int i = 0; i < dgItem.Rows.Count; i++)
        {
            XmlElement infoEle = doc.CreateElement("xl");

            DataRowView drv = (DataRowView)dgItem.Rows[i].DataItem;
            TextBox tb = (TextBox)dgItem.Rows[i].FindControl("txtdrgno");
            TextBox tb1 = (TextBox)dgItem.Rows[i].FindControl("txtdrgno1");


         }
        string s = doc.InnerXml;
        return s;
    }
    
}

Thank You

And the error is?

Thanks for the reply

the error is really weird ,

Line 764:
Line 765: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 766: public override int GetTypeHashCode() {
Line 767: return 531973274;
Line 768: }


And I havent used anything like int GetTypeHashCode() in my code.So am really confured


Thank You

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0115: 'ASP.main_insert_tochscounterstyle_aspx.GetTypeHashCode()': no suitable method found to override

Source Error:

Line 764:
Line 765: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 766: public override int GetTypeHashCode() {
Line 767: return 531973274;
Line 768: }

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.