Ajax.NET Professional Demonstation Site

I'm working on a first demonstration site for Ajax.NET Professional. Maybe you can help me to decide which examples you want to see: AutoComplete, Banners, HtmlUpdater, FormUpdater, ...

Ajax.NET Professional will allow you to use your objects as return values and as arguments without the need to write a IAjaxObjectConverter:

public interface IPerson
{
  
string FirstName{get;set
;}
}

public class Person : IPerson
{
   private string
firstName;
   public string
FamilyName;
   public int
Age = 0;
   public double Depot = 0.0;

   public Person()
   {
      // must have this constructor !!
   }

   public Person(string firstName, string familyName)
   {
      this
.firstName = firstName;
      this
.FamilyName = familyName;
   }

   #region IPerson Members

   public string FirstName
   {
      get
      {
         return this
.firstName;
      }
      set
      {
         this.firstName = value
;
      }
   }

   #endregion

}

 public class Boss : Person
{
   public string CompanyName;

   public Boss() : base()
   {
       // must have this constructor !!
   }

   public Boss(string firstName, string familyName, string companyName) : base(firstName, familyName)
   {
       this.CompanyName = companyName;
   }

}

Now, we want to have a look at the Ajax.NET Professional method. The first method will return a IPerson object from a database. The second on will get this IPerson object from the client-side JavaScript to check if it is a Boss object.

[Ajax.AjaxMethod]
public IPerson GetPersonFromID(int
id)
{
    if
(id == 1)
    {
        Person p = new
Person();
        p.FirstName = "Michael";
        p.FamilyName = "Schwarz";

        return p;
   
}
    else
    {
       
Boss b = new
Boss();
        b.FirstName = "Hans";
        b.FamilyName = "Mustermann";
        b.CompanyName = "Your Company";

        return b;
   
}
}

[Ajax.AjaxMethod]
public bool
IsBoss(IPerson p)
{
    return p is
Boss;
}

[Ajax.AjaxMethod]
public IPerson RefreshPersonObject(IPerson p)
{
    p.FirstName = "Refreshed FirstName...";

    return p;
}

 

Published Tuesday, August 30, 2005 3:54 PM by Michael Schwarz

Comments

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 10:33 AM by anonymous
AutoComplete would be nice...

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 11:04 AM by Wallym
I'm thinking AutoComplete.

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 11:45 AM by FcoGuerrero
but..... when o where is Ajax.NET Professional??...

Very good !!

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 11:47 AM by Michael Schwarz
@FcoGuerrero: I hope that I can put a first beta version online tomorrow or the day after! Please check my blog for latest news.

CIAO
Michael

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 11:49 AM by Olli
Michael, YOU ARE GREAT!!!! YOU ARE THE BEST AND FASTEST DEVELOPER FOR AJAX ON .NET PLATFORM!!!!!!!!! Thanks!

# re: Ajax.NET Professional Demonstation Site

Tuesday, August 30, 2005 11:56 AM by FcoGuerrero
Thanks Michael... is very very good product and in my big ERP Proyect in Spain is a essencial key in.

# re: Ajax.NET Professional Demonstation Site

Wednesday, August 31, 2005 12:05 AM by William Luu
Wow, very impressive Michael.

Nice ideas.

How about a progress bar of some sort using Ajax.NET? (This shouldn't be too difficult I think)

Have you looked at perhaps using some of the Dojo (http://dojotoolkit.org) stuff with Ajax.NET?

# re: Ajax.NET Professional Demonstation Site

Monday, September 12, 2005 5:30 AM by Tamer Fathy
I suggest it will be better to demonstrate

by Biding DataGrid with View Details (Master Detail)will be better and bind the datagrid with collection of Person class (for example)


Thanks,
Tamer Fathy

# re: Ajax.NET Professional Demonstation Site

Tuesday, September 13, 2005 5:54 AM by Thomas Møller
Can you somehow get the file size of a file through a ASP.net site using ajax.net