ASP.NET Hosting

PageMethods for VS 2005 released - well-defined URLs for your ASP.NET sites and applications

PageMethods for Visual Studio 2005 has just been released. This version offers the same support as the version for VS 2003, plus some additional features.
PageMethods proposes a new code model that enables well-defined URLs and simplifies working with hyperlinks for your ASP.NET sites and applications.

PageMethods enables reliable URLs.
Linking to a web page is very easy, both in simple HTML and in ASP.NET. Linking to a page that really exists, passing the right parameters, and parsing these parameters, is a bit different.
PageMethods takes care of your URLs. It proposes a solution to define structured URLs for each of your pages, as well as a clean and simple way to call them.
The idea is based on strict page inputs and declarative parameter binding. With PageMethods, each page exposes a set of methods that represent the different ways to call the page. All you have to do to start benefiting from sharp, reliable URLs is to add methods to your pages, and mark these methods with attributes provided by PageMethods.

Here is how you would declare a page method:

[PageMethod]
protected void DisplayCustomer(int customerID)
{
  ...
}

Here is how you would refer to the page declaring this method:

MyHyperLink.NavigateUrl = MyPageMethods.Customers.CustomerPage.DisplayCustomer(1234);


Features include:
  • Object-oriented approach for hyperlinks
  • No concatenations of strings required anymore
  • Strongly typed parameters
  • Automated parameter handling
  • Parameter validation
  • Compile-time checks
  • Code completion
  • Integrated with Visual Studio
  • Support for HTTP GET and HTTP POST (new)
  • Support for arrays and custom objects (new)
PageMethods is available for free.

Learn more on the dedicated site, where you'll find:
  • an introduction
  • a walkthrough tutorial
  • details about the features and benefits
  • and of course a page to download the product.
See http://metaSapiens.com/PageMethods

Don't forget to let me know what you think about the product, and what your experience with it is!

8 Comments

  • The .zip file for VS2005 seems to be corrupt...

  • Colin, it works fine for me, and you are the first to report this.

    I will try to send it to you by e-mail.

  • Hi there,

    I just installed PageMethods (VS2005 version) but it doesn't show up in the Add-In Manager. Someone a clue about this?



    thx

  • For information, the solution to this kind of problem is now described in the FAQ.

  • Hello,

    I just have one more issue/question regarding PageMethods: I noticed that calling an overloaded PageMethod method causes an exception at runtime. Is this known? is it a feature or a bug and should it be avoided?

    Thanks,

    Lefti

  • One more: let's assume I have a page called login.aspx, which I want to be able to call i.e. optionally with a modifier like "ShowUnauthDetails" (which would display to unauthorized users who tried to access previously a closed area an additional message).



    Calling the page without this modifier (for users calling it the first time in order to login), should not show this message.



    What I did: I tried implementing a Display PageMethod method (not default). What I get when I call the page login.aspx directly through the browser (i.e. not by redirecting with MyPageMethods.Login.Display(True)) is a "Check URL Bad parameters" exception or similar message.



    Maybe I misunderstood sth.? The code samples are very good but I'm afraid they didn't help me regarding this. A hint or a small explanation would be great.

    Thx again for your time

  • If I understand the URLFormat, it's only if you are doing URL Rewrites it doesn't rewrite them for you. Is that right? If so, do you have any plans on implementing a URL rewrite system that would leverage all of the PageMethods knowledge of the pages it's calling?



    I love the tool but I was really hoping it would rewrite the URLS too as dirty querystrings are my real problem.

  • Excellent to hear!! You will definitely have a saleable item with that.



    Also, thanks for the demos.

Comments have been disabled for this content.