Blog - Microsoft .NET, ASP.NET, AJAX and more

Get and Set Properties using .NET Reflection

by Cedric Boudoya 9/29/2008 5:13:03 PM

Introduction

I would like to set the text value on a textbox control. It sounds easy enough. First, I would like to create a textbox web control then I would like to access one of its properties "Text" and set the text to "Hello World". Well what do you need to do to write your code in a generic way so you are can abstraction of the fact that the web control is actually a text box, it could be any web control.

We will visit different ways to be able to this.
More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Stumble It! kick it on DotNetKicks.com
Tags: ,
Categories: .NET | C# | Reflection
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

ObjectDataSource, SOA Style

by Dave Marini 8/18/2008 11:43:00 PM

It's been entirely too long since my last post, and with the olympics in full swing, we'll go with a volleyball theme for this post.


BUMP

So here's the scenario. After really digging your teeth into ASP.NET 2.0 and playing around wiih all the cool data access features, you decide to apply a liberal use of the ObjectDataSource for its ability to take care of the paging and sorting calls for you. Now, you begin to convert your site to a service oriented back end and you wonder how you're going to make calls against your web service. You have a few options in front of you. You can create a thin facade layer that will act as a liaison between your presentation code and your service layer calls, and hook your ObjectDataSource to that. This works especially well when you have a complex object model that makes use of the web service calls behind the scenes. It's also beneficial when you are generating your proxy classes from metadata or contacting a foreign web service. In the scenario I'm going to demonstrate here, I'm referencing a shared contract and service library, so I'll be using using the ObjectDataSource to make direct calls to ChannelFactory<T> for this example.

More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Stumble It! kick it on DotNetKicks.com
Tags:
Categories: .NET | ASP.NET | C# | Reflection | WCF | Web Services
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed