Oct 3 2007

Releasing Source Code for the .NET Framework Libraries

Category:Bil@l @ 20:17

I was surprised to read a post on Scott Guthrie's blog that the .NET Framework Libraries have been released for public!!! You can now debug code and enter directly to the .NET Framework code, that is so cool from Microsoft!!!

 

Can we call the Microsoft .NET Framework now, Microsoft Open Source .NET Framework :)

 

Have a look at this post by Scott: http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx

 

Hope this helps,
Regards

Tags:

Oct 3 2007

Private Field initialization in ASP.NET AJAX

Category:Bil@l @ 14:10

I will be publishing my first version of the Inline-Edit control on October 4, 2007 on www.aspalliance.com. That control is based on another non-ASP.NET AJAX control. So two days ago I started working on a new version of the Inline-Edit control that is purely an ASP.NET AJAX Control.

I noticed something very nice to share:

When you define private fields in AJAX inside the class constructor and add to it the set/get methods, as properties, then if you don't provide values for these two properties when you use the $create method to create a new instance of that control, the set methods are never called.

 

However, sometimes you might need to give some initialization values for those private fields, so where is the best place to do so? I thought of using the getters and setters but as I explained above, it doesn't help.

What you can do is simply provide the initialization data inside the constructor as the following:

Bhaidar.AJAX.Controls.InlineEditLabel = function(element) {
    Bhaidar.AJAX.Controls.InlineEditLabel.initializeBase(this, [element]);
    this._toolTip= '';
    this._updateButtonText = 'Update';
}

The above sample code is part of the new inline-edit control I am developing. So now, even if the developer didn't provide some text to the updateButonText, she will be able to show the default text specified in the constructor.

 

Hope this helps,

Regards

Tags:

Sep 30 2007

First Post from Windows Live Writer

Category:Bil@l @ 09:57

I am posting my first post from the Windows Live Writer. I haven't tested it yet, but you can have a look at it and see how it works:

Windows Live Writer

You can add images easily and they get uploaded automatically to your blog as shown below:

DSC00400

You can add tables, hyperlinks, tags, videos, etc ...

Check it out, really cool!

Regards

Tags:

Sep 28 2007

Method Overloading in WebServices

Category:Bil@l @ 13:11

Sometimes there is a need to have two Web methods with the same name but off course different number of parameters. When developing Web Services, it is not enough to just ad two methods with different parameters as you do when developing an API.

In Web Services you need to specify MessageName to be different for each overload method as follows:

[WebMethod(MessageName="LogMessage1"),
    SoapDocumentMethod(OneWay=true)
]
public void LogMessage(string message)
[WebMethod(MessageName="LogMessage2"),
    SoapDocumentMethod(OneWay=true)
]
public void LogMessage(string message, string userName)

 

Hope this helps,
Regards

 

Tags:

Sep 28 2007

One-Way WebServices Methods

Category:Bil@l @ 12:58

When designing Web Services, we sometimes need to call methods that don’t have any response.

Defining such methods as void is not the solution for one-way Web Service methods.

What you need to do is specify the SoapDocumentMethod to be OneWay and here is an example: