Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6558987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:16:02+00:00 2026-05-25T13:16:02+00:00

I have a viewpage and a partialview on that. For default request-when page is

  • 0

I have a viewpage and a partialview on that. For default request-when page is called- CultureInfo is set in base class of viewPage. I have created this custom base class which initialize the culture depending on a cookie and does some other stuff as well. There is a search button on the view page which updates a partial view on the page with Ajax call (jquery Ajax call). There is separate action for this partial view update call which returns partial view. The problem is partial view do not have any base class and when resources are displayed on partial view they are displayed for default culture and not the current culture. What would be best approach to set cultureInfo when partial view is called from jQuery Ajax call?

I have this mvc application as part (area) of bigger existing application so I can not touch session_start.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:16:02+00:00Added an answer on May 25, 2026 at 1:16 pm

    I’m not sure why you need to pass the culture around, can’t you get it directly from your PartialView using a helper method?

    @YourApp.CultureHelper.GetCurrentCulture()
    

    which is just calling

    public static string GetCurrentCulture()
    {
       return Thread.CurrentThread.CurrentCulture.Name;
    }
    

    If you are doing any work with internationalization and ASP.NET MVC I highly recommend reading through these two excellent posts by Nadeem Afana

    • ASP.NET MVC 3 Internationalization
    • ASP.NET MVC 3 Internationalization – Part 2 (NerdDinner)

    Very well written and explains everything you need to know about internationalization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strongly typed viewpage that I created that looks like this: <%@
I have a page that has to render a huge set of query results
I have a ViewPage that contains <% Html.RenderAction<MyController>(c => c.SidebarStats()); %> . On the
On a System.Web.UI.Page.ViewPage I have access to the current User ( System.Security.Principal.IPrincipal ) but
I have a view page that accepts a taxonomy term id as an argument
I currently have a product view page that contains an MVCContrib HTML Grid with
I have a controller's action and view page that uses a master page. The
I have a view that is strongly typed: <%@ Page Title= Language=C# MasterPageFile=~/Views/Shared/Site.Master Inherits=System.Web.Mvc.ViewPage<MPKwithMVC.Models.SmartFormViewModel>
I have this classes: public class GroupMetadata { [HiddenInput(DisplayValue = false)] public int Id
I have my main view like this: <%@ Page Title= Language=C# MasterPageFile=~/Views/Shared/Site.Master Inherits=System.Web.Mvc.ViewPage %>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.