Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ILinkedInService service = _linkedInService;

        try
        {
            service.CreateShare(console.Text, VisibilityCode.Anyone);
        }
        catch (LinkedInException lie)
        {
            console.Text += lie.Message;
        }
    }
Example #2
0
    protected void sendButton_Click(object sender, EventArgs e)
    {
        ILinkedInService service = _linkedInService;

        try
        {
            console.Text += service.CreateShare(commentTextBox.Text, VisibilityCode.ConnectionsOnly);
        }
        catch (LinkedInException lie)
        {
            console.Text += lie.Message;
        }
    }
Example #3
0
    protected void sendButton2_Click(object sender, EventArgs e)
    {
        ILinkedInService service = _linkedInService;

        try
        {
            console.Text += service.CreateShare(string.Empty, titleTextBox.Text, string.Empty, new Uri(submittedUrlTextBox.Text), null, VisibilityCode.ConnectionsOnly, postOnTwitterCheckBox.Checked);
        }
        catch (LinkedInException lie)
        {
            console.Text += lie.Message;
        }
    }
    protected void updateButton_Click(object sender, EventArgs e)
    {
        try
        {
            ILinkedInService service = _linkedInService;

            service.CreateShare(statusTextBox.Text, VisibilityCode.ConnectionsOnly);

            ShowCurrentStatus();

            currentStatusLabel.Text = "Your updated status:";
            messageLabel.Text       = "You successfully updated your status.";
        }
        catch (LinkedInException li)
        {
            messageLabel.Text = string.Format("An error occured: {0}", li.Message);
        }

        messageLabel.Visible = true;
    }