Robert McLaws: FunWithCoding.NET

Public Shared Function BrainDump(ByVal dotNet As String) As [Value]

News

<script type="text/javascript"><!-- google_ad_client = "pub-4330602465258980"; google_hints = "ASP.NET, VB.NET, C#, C#.NET, WindowsForms, .NET Framework, VS2005, Visual Studio, XAML, WinFX, Windows Workflow, WPF, WCF, Atlas, NetFX3, Visual Studio Orcas"; google_ad_width = 120; google_ad_height = 240; google_ad_format = "120x240_as"; google_ad_type = "text_image"; google_ad_channel ="4997399242"; google_color_border = "B6C9E7"; google_color_bg = "EFEFEF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "002C99"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<!--
-->

You should feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever. That said, I will most likely only delete abusive, profane, rude, or annonymous comments, so keep it polite, please.

Blogroll

Cool .NET Articles

My .NET Tools

My Builder.com Articles

My MSKB Articles

Working with .Text Web Services

Did you know that you have web service access to your blog? You can find it at http://weblogs.asp.net/yourblog/services/simpleblogservice.asmx. I've been experimenting with it for my new BlogStudio tool, and I wanted to inform you of a couple things you'll need to know to get it working.

In order to use the InsertPost method of the web service, you ALWAYS have to set the URL of the web service, no matter what the web service reference says. Why? Diving into the VS.NET generated code shows us.

<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="SBS (Simple Blog Service)Soap", [Namespace]:="http://www.aspnetweblog.com/services/simpleblogservice/")> _
Public Class SBSSimpleBlogService
   
Inherits
System.Web.Services.Protocols.SoapHttpClientProtocol

    '<remarks/>
    Public Sub New
()
        MyBase
.New
        Dim urlSetting As String
= System.Configuration.ConfigurationSettings.AppSettings("BlogStudio.WebServices.DotText.SBS (Simple Blog Service)")
        If (Not (urlSetting) Is Nothing)
Then
            Me.Url = String
.Concat(urlSetting, "")
        Else
            Me
.Url = “http://weblogs.asp.net/Services/simpleblogservice.asmx“
        End
If
    End
Sub
.....
End Class

So, my web service call was always pointing to the non-existent "services" blog. It didn't start working until I used this code instead:

Dim Blog As New WebServices.DotText.SBSSimpleBlogService
Blog.Url = “
http://weblogs.asp.net/rmclaws/services/simpleblogservice.asmx“
Blog.InsertPost("username", "password", DateTime.Now.ToString, "Test Post", EntryPanel.SaveHtml)

There you have it. A simple way to add a post to your blog.

On a related note, I think it's really ridiculous that I could not find a decent WinForms HTML edit control. Why is it that none of them render formatting toolbars as an option? I guess FreeTextBox ruined me for other HTML controls. Oh well, I'm using the SandBar menu controls, and loving it. The only thing I can't do is pull the value out of a dropdown in the toolbar. Can't find the event to check for. Any ideas?

Posted: Mar 11 2004, 03:22 PM by interscape | with 5 comment(s)
Filed under:

Comments

Chris Frazier said:

use the comboBoxItem.ComboBox property - it will give you access to the combobox on the toolbar.

The event? SelectedIndexChanged.

Cheers.
# March 11, 2004 6:50 PM

Robert McLaws said:

It's not showing up to in the IDE let me handle that event.
# March 11, 2004 6:56 PM

TrackBack said:

# March 11, 2004 10:27 PM

TrackBack said:

You have been Taken Out. Thank you the post.
# March 12, 2004 4:02 AM

TrackBack said:

# April 7, 2004 10:09 AM