Private Function InsertPost() As Int32 ' add post to database, we indicate this is not a poll below ' if successfull a topic object is returned with new post Dim Topic As InstantASP.InstantForum.Components.Topic = _ InstantASP.InstantForum.Business.Posts.InsertPost(CType(ForumID.Value, Int32), _ CType(TopicID.Value, Int32), CType(ParentID.Value, Int32), _ MyBase.CurrentContext.CurrentUser.UserID, _ ctlPostControl.MessageIcon, ctlPostControl.Subject, _ ctlPostControl.Description, ctlPostControl.Message, _ ctlPostControl.AttachmentGUID, False, CurrentContext) ' was post insert ok If Not Topic Is Nothing Then ' do we have a post If Topic.PostID > 0 Then ' call our method to add a adsense post InsertAdSensePost(Topic.PostID)- we've removed the rest of the code for readability.