Error in setting properties in Visual Studio 2010

Asked By 0 points N/A Posted on -

I was using visual studio 2010 to create a specific custom listed event receiver.

But it was showing an error message to set on properties. The message is shown here to clarify.

<nativehr>0x81020089</nativehr><nativestack></nativestack> The Help Desk

Server Error in "/" Application


Description : An unhandled exception occurred during the execution of the current web request. Please review the 

Exception Details : System.Runtime.InteropServices.COMException: <nativehr>0x81020089</nativehr><nativestac

Source Error : An unhandled exception was generated during the execution of the current

Can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x81020089) :<nativehr>0x81020089</nativehr><nativestack></nativest ]

I’m interested to know the process of customizing the form.

Can anyone please help me with any suggestion?

Answered By 0 points N/A #147011

Error in setting properties in Visual Studio 2010


Add an event receiver to this project. To do this, click the project node in Solution Explorer and then select Add New Item on the Project menu.Expand the SharePoint node under either Visual C# or Visual Basic, and then click 2010.In the Templates pane, select Event Receiver and name it TestEventReceiver1.The SharePoint Customization Wizard appears.On the Choose Event Receivers page, select List Item Events as the event receiver type.Set the Event source item to CustomField1 – ListDefinition1.In the list of events to handle, check the box next to An item was added and then click Finish.The new event receiver code file contains a single method named ItemAdded. Add code to this method so that every time a contact is added to the contact list, a default Patient Name value of Scott Brown is used. To do this, replace the existing ItemAdded method with the following:


public override void ItemAdded(SPItemEventProperties properties)
    properties.ListItem["Patient Name"] = "Scott Brown";

Press F5 to run the code and view the SharePoint site in the Web browser.On the QuickLaunch bar, click CustomField1 – ListInstance1.This is the List Instance for the list definition. Note that the Patient Name field does not yet appear as a column in the list instance.Click List in the List Tools tab at the top of the page and then click the Modify This View button on the ribbon.In the list of available column names, select Patient Name and then click OK. Notice that the Patient Name field now appears in the list instance.On the List Tools tab at the top of the page, click Items and then the New Item button to display the data entry form.Enter data in the fields and then click the Save button in the list instance's new item dialog box.
The Patient Name column automatically populates with Scott Brown after you click OK.

Login/Register to Answer

Related Questions