IUserResourceSetUrl Method |
Set the value of the resource as an URL.
Namespace:
AskiaPortalCmn
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax IReturnValue SetUrl(
string url
)
Function SetUrl (
url As String
) As IReturnValue
IReturnValue^ SetUrl(
String^ url
)
Parameters
- url
- Type: SystemString
URL of the resource
Return Value
Type:
IReturnValueReturn success value if the user in the context have enough permission to do that action.
Remarks
It will not save the change in the database
unless you explicitly call the
Save method.
Examples Set the resource as an URL
var context = ContextFactory.CreateByLoginOrEmailAndPassword("login", "secret");
var user = context.User;
var resource = user.Avatar;
var result = resource.SetUrl($"https://my.avatar.url.com?email={user.Email}");
if (!result.Success)
{
throw result.Exception;
}
See Also