Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to save contact in outlook with the help of link button click in asp .net.
it is working but it give a message a dialog box is open.close it and try again.
code are given below.


C#
OutlookInterop.ContactItem newContact = (OutlookInterop.ContactItem)app.CreateItem(OutlookInterop.OlItemType.olContactItem);
                  newContact.FirstName = (txtfirstname.Text);
                  newContact.LastName = (txtlastname.Text);
                  newContact.Email1Address = (txtemail.Text);
                  newContact.WebPage = (txtwebpage.Text);

                  newContact.BusinessTelephoneNumber = (txtlandline.Text);
                  newContact.BusinessFaxNumber = (txtFaxno.Text);
                  newContact.MobileTelephoneNumber = (txtmobileno.Text);

                  newContact.BusinessAddressStreet = (txtstreet1.Text);
                  newContact.BusinessAddressCity = (txtcity1.Text);
                  newContact.BusinessAddressState = (txtstate1.Text);
                  newContact.BusinessAddressPostalCode = (txtpostal1.Text);
                  newContact.BusinessAddressCountry = (txtcountry1.Text);
                  newContact.Display(true);
Posted
Updated 24-Nov-11 20:31pm
v2

1 solution

Outlook is a client side application it will not work in a ASP.net server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900