Hot answers tagged

2

Try this method: Without attachment using SPUtility. private Boolean SendEmail() { try { bool flag = false; SPSecurity.RunWithElevatedPrivileges( delegate() { using (SPSite site = new SPSite( SPContext.Current.Site.ID, SPContext.Current.Site.Zone)) { using (SPWeb web = ...


1

Let's see how the page should work. When you select a web part in the Add Web Part gallery, a preview of the web part is displayed on the right panel (it would appear where the error message is). This means that SharePoint has to render a part of the web part to be able to display such preview - this is why the OnInit method is run. As for the .IsPostBack ...



Only top voted, non community-wiki answers of a minimum length are eligible