Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • kukuwka 75 posts 96 karma points
    Aug 31, 2010 @ 15:59
    kukuwka
    0

    How to pass parameters to /Base.

    Hi,

    How can I pass parameters to /Base.

    Something like:

    namespace BaseTest {
        public class TestClass {
            public static string Hello(string text) {
                return text;
            }
        }
    }

    Thanks,

    kukuwka

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Aug 31, 2010 @ 16:02
    Matt Brailsford
    0

    Hi Kukuwka,

    I belive they just need to be in the request object (either via the querystring or form post).

    Many thanks

    Matt

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Aug 31, 2010 @ 16:03
    Matt Brailsford
    0

    PS If you have an umbraco.tv subscription, you may want to check out the following videos

    http://umbraco.org/documentation/videos/for-developers/base-and-ajax-development/introduction-to-base

    Many thanks

    Matt

  • kukuwka 75 posts 96 karma points
    Aug 31, 2010 @ 16:58
    kukuwka
    0

    Throught querystring  doesn't work

    (or maybe do I  something wrong?)

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Aug 31, 2010 @ 17:10
    Matt Brailsford
    0

    Ahhh, my bad, it looks like you pass them as part of the url

    http://www.mysite.com/base/TestClass/Hello/SomeValue.aspx

    Where SomeValue will be the value of text parameter. If you have more than one, just add keep adding them as additional directories on the URL.

    An alternative would be to use the querystring and just use

    HttpContext.Current.Request.QueryString

    Matt

  • kukuwka 75 posts 96 karma points
    Sep 01, 2010 @ 08:39
    kukuwka
    0

    Thank you very much.

    It works fo me.

    It's must be :

    www.mysite.com/base/TestClass/Hello/Param1/Param2

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies