Try our conversational search powered by Generative AI!

Url-friendly string in EPiServer 4.62b



I've got a problem, I need to convert a string with special characters like "Série" to "Serie" and insert into "Page name in Web address". In episerver 4.62b the name of a page is saved in this kind of friendly string into the property "Page name in Web address" when you hit the "Save and publish"-button and the field is empty, but when you save a page programatically the string does not get saved.
Is there a way to use this EPiServer function programatically, or do i need to do it the hard way with Regex?

Jun 08, 2010 15:52

Do you set the saveaction to publish=

I did a quick test in edit mode on an old site and if you just save the page the "name in web adress" doesn't get updated but that's done as soon as you publish the page.


Jun 08, 2010 22:52


Yes, I am using this line to save the page


I find it strange that EPiServer handles "Save and Publish" and Global.EPDataFactory.Save with SaveAction.Publish differently.
I guess that you can't reach this code which activates when you press the "Save and Publish" button, but is there a way to easily mimic it?

Jun 09, 2010 8:18

You could always use Reflector to find out how EPiServer handles the Save&Publish-event. I don't have any dlls for EPi4 on this computer, so you have to do that by yourself.

Jun 09, 2010 10:33


I've managed to get the code which EPiServer uses, though I had to modify it, it works really well. Now I dare not to think of how the Asian languages will do with this, I guess it will have to be modified again when that time comes.

Thank you all for your help.

Jun 09, 2010 15:58

In CMS 6 you can do it like this: myPage.URLSegment = EPiServer.Web.UrlSegment.CreateUrlSegment(myPage); Maybe similiar in 4.X


Jun 14, 2010 22:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.