Changing posting name when creating
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Changing posting name when creating




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Changing posting name when creating  
Sergio Navarro (MCAD Spain)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-23-06 06:15 PM

Hello,

I need to change the posting name when creating it.

I try to change it in CmsPonting_PropertyChanged event, but it raises an
exception.

It's posible to change the name?

PS: Sorry for my poor English





[ Post a follow-up to this message ]



    Re: Changing posting name when creating  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-23-06 06:15 PM

Hi Sergio,

you need to do this in the CmsPosting_PropertyChangingEvent.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Sergio Navarro (MCAD Spain)"
<SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
news:4EFE5DC2-FC59-477D-8578-602FBF158DBD@microsoft.com...
> Hello,
>
> I need to change the posting name when creating it.
>
> I try to change it in CmsPonting_PropertyChanged event, but it raises an
> exception.
>
> It's posible to change the name?
>
> PS: Sorry for my poor English







[ Post a follow-up to this message ]



    Re: Changing posting name when creating  
Sergio Navarro (MCAD Spain)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-06 12:15 PM

Thanks  Stefan,

it's working with CmsPosting_PropertyChangingEvent.

The name must be set in e.PropertyValue, not in Posting.name that raises an
exception.

Here is my code, perhaps anybody wants see it:


Sub CmsPosting_PropertyChanging(ByVal sender As Object, ByVal e As
PropertyChangingEventArgs)

Try

' Dim elPost As Posting = CType(e.Target, Posting)
' elPost.name= "name"   This isn't working


Dim nombrePropiedad As String = e.PropertyName
Dim valorPropiedad As String = CType(e.PropertyValue, String)

e.PropertyValue = valorPropiedad & "_sufijo"

Catch ex As Exception


End Try

End Sub


"Stefan [MSFT]" wrote:

> Hi Sergio,
>
> you need to do this in the CmsPosting_PropertyChangingEvent.
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44[/url...nyurl.com/8ugwj
> ----------------------
>
>
> "Sergio Navarro (MCAD Spain)"
> <SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
> news:4EFE5DC2-FC59-477D-8578-602FBF158DBD@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Changing posting name when creating  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-25-06 12:15 AM

Yes, that is the correct approach.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Sergio Navarro (MCAD Spain)"
<SergioNavarroMCADSpain@discussions.microsoft.com> wrote in message
news:864D8356-AC7A-4DB3-8EFC-0371BBA5833B@microsoft.com...[vbcol=seagreen]
> Thanks  Stefan,
>
> it's working with CmsPosting_PropertyChangingEvent.
>
> The name must be set in e.PropertyValue, not in Posting.name that raises
> an
> exception.
>
> Here is my code, perhaps anybody wants see it:
>
>
> Sub CmsPosting_PropertyChanging(ByVal sender As Object, ByVal e As
> PropertyChangingEventArgs)
>
>        Try
>
>            ' Dim elPost As Posting = CType(e.Target, Posting)
>            ' elPost.name= "name"   This isn't working
>
>
>            Dim nombrePropiedad As String = e.PropertyName
>            Dim valorPropiedad As String = CType(e.PropertyValue, String)
>
>            e.PropertyValue = valorPropiedad & "_sufijo"
>
>        Catch ex As Exception
>
>
>        End Try
>
>    End Sub
>
>
> "Stefan [MSFT]" wrote:
> 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:27 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register