Trying to add "Add Contact" feature on my asp/vb .net forum

  •  02-11-2010, 3:20 PM

    Trying to add "Add Contact" feature on my asp/vb .net forum

    Hi all,
     
    i was wondering if anyone knew how to make a button for a site (more specifically, for my forum) which allows me to add a contact to my contact list. I currently have the following:
    1. Imports CuteSoft.Chat  
    2.   
    3. Partial Class Support_addbuddy  
    4.     Inherits System.Web.UI.Page  
    5.   
    6.     Private Sub Page_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
    7.          
    8.         'Code for adding the author for the current message as IM contact  
    9.         If Request.QueryString("memberID") <> Request.QueryString("BuddyID"Then  
    10.   
    11.             Dim senderID As Int32 = UserInfoHelper.GetCuteIMUserObjectIDByProgramUserID(Request.QueryString("memberID"))  
    12.             Dim buddyID As Int32 = UserInfoHelper.GetCuteIMUserObjectIDByProgramUserID(Request.QueryString("buddyID"))  
    13.             Dim senderChatUserID As Int32 = UserInfoHelper.GetCuteChatUserIDByCuteIMObjectID(senderID)  
    14.             Dim buddyChatUserID As Int32 = UserInfoHelper.GetCuteChatUserIDByCuteIMObjectID(buddyID)  
    15.             Try  
    16.                 ChatApi.AddContact(senderChatUserID, buddyChatUserID)  
    17.                 ChatApi.SyncContacts(senderID, True)  
    18.                 ChatApi.SyncContacts(buddyID, True)  
    19.   
    20.             Catch ex As Exception  
    21.                 ReportError(ex)  
    22.             End Try  
    23.         End If  
    24.   
    25.     End Sub  
    26.   
    27. End Class 
    For some reason it doesn't work. Please advise.
     
    Thanks!

    Filed under: , , ,
View Complete Thread