|
Home > Archive > Microsoft Content Management Server > December 2004 > Customize Cancel Message When I cancel an approving event in Global.asax
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Customize Cancel Message When I cancel an approving event in Global.asax
|
|
| Tony Cheng 2004-12-31, 7:46 am |
| When I set e.Cancel = true in void CmsPosting_Approving function, there
would be a message appeared on the default console, I want to ask whether I
can customize the message or not ?
Thx
| |
| mikey_doc 2004-12-31, 7:46 am |
| Hi Tony
There may be other ways to change create a custom message but I used
the pre-render event for the message box.
Here we wanted to make sure the posting went through the submission
process before approved (Adding metatdata)
Private Sub onPreRender_Handler(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ErrorModeContainerFailedApprove1.PreRender
'In order to change the error message displayed by the
ErrorModeContainerFailedApprove
'a new exception is created and assigned to the container
'note the exception constructor allows the error message to be
declared
Dim eXcep As New Exception("This posting must be submitted
before approval")
ErrorModeContainerFailedApprove1.Error.Exception = eXcep
ErrorModeContainerFailedApprove1.Error.Title = "Approve failed
posting not submitted"
End Sub
You might want to add a bit of code to check that its your custom event
that has stoped the approval and not a CMS error or whatever.
Mikey
Tony Cheng wrote:
> When I set e.Cancel = true in void CmsPosting_Approving function,
there
> would be a message appeared on the default console, I want to ask
whether I
> can customize the message or not ?
>
> Thx
| |
| Tony Cheng 2004-12-31, 7:46 am |
| Thanks for your suggestion , Mikey ^_^
"mikey_doc" <michdoh@yahoo.com> wrote in message
news:1104485959.968093.124560@c13g2000cwb.googlegroups.com...
> Hi Tony
>
> There may be other ways to change create a custom message but I used
> the pre-render event for the message box.
>
> Here we wanted to make sure the posting went through the submission
> process before approved (Adding metatdata)
>
> Private Sub onPreRender_Handler(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles ErrorModeContainerFailedApprove1.PreRender
> 'In order to change the error message displayed by the
> ErrorModeContainerFailedApprove
> 'a new exception is created and assigned to the container
> 'note the exception constructor allows the error message to be
> declared
> Dim eXcep As New Exception("This posting must be submitted
> before approval")
> ErrorModeContainerFailedApprove1.Error.Exception = eXcep
> ErrorModeContainerFailedApprove1.Error.Title = "Approve failed
> posting not submitted"
> End Sub
>
> You might want to add a bit of code to check that its your custom event
> that has stoped the approval and not a CMS error or whatever.
>
>
> Mikey
>
> Tony Cheng wrote:
> there
> whether I
>
|
|
|
|
|