Hi,
I have some code that needs to build a MonoRail URL inside a
controller action.
N.b. It's not used for a redirect so I can't just call the Redirect
method. It's going into an e-mail later.
At the moment I'm using:
var urlBuilderParameters = new UrlBuilderParameters
{
Controller = "Authentication",
Action = "VerifyEmail",
QueryString = new
{
i = user.ID,
v =
user.VerificationCode
},
CreateAbsolutePath = true,
};
var verificationLink =
Context.Services.UrlBuilder.BuildUrl(Context.UrlInfo,
urlBuilderParameters);
The Castle API docs suggest you used to be able to call
Controller.UrlBuilder, but it's not there. Is there a preferred way of
doing this, or should I just go through Context.Services like in the
example above?
Many thanks,
James
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.