language setting lost in custom aspx on postback

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/14/2011 8:53:50 AM
Gravatar
Total Posts 87

language setting lost in custom aspx on postback

Hi here is my situation,

i have multilanguage site with subfolders for language specific clones of the site. I have some few custom pages in one subfilder "/Myfolder/Mypage.aspx" (clear aspx pages to use in iframes) i've made localization of this pages using localresourses, and everything works fine - if i go to url like mysite/it/Myfolder/mypage.aspx  i get my site in italian. But when i do postback (edit link in gridview)  hope that it will be mysite/it/Myfolder/mypage.aspx - but it works like mysite/Myfolder/mypage.aspx from root site) .

Any advise on this? it can be solved by making hidden fields, public properties and sessions to switch locale manually but i hope there is some small setting i miss :)

Regards,

Victor

 

7/14/2011 10:52:36 AM
Gravatar
Total Posts 18439

Re: language setting lost in custom aspx on postback

you need to view the source of your page and see if the form action includes the folder in the url, if not you will need to make it do that.

Assuming you are already including the folder correctly when building the url for the iframe, then the page in the iframe should post back to the same url with the folder.

something like this might help

try
{
SiteUtils.SetFormAction(Page, Request.RawUrl);
}
catch (MissingMethodException)
{
//this method was introduced in .NET 3.5 SP1
}

Hope that helps,

Joe

7/14/2011 11:04:45 AM
Gravatar
Total Posts 87

Re: language setting lost in custom aspx on postback

Thank you very much!!!! this is exactly what i was missing.

Regards,

Victor

You must sign in to post in the forums. This thread is closed to new posts.