Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. not getting value in session("lang")

not getting value in session("lang")

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anbusenthil
    wrote on last edited by
    #1

    tis is my code in class file called langsetting here i am not getting value in session("lang") Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ci As CultureInfo Thread.CurrentThread.CurrentCulture = Session("lang") rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources")) ci = Thread.CurrentThread.CurrentCulture LoadStrings(ci) End Sub

    A P 2 Replies Last reply
    0
    • A anbusenthil

      tis is my code in class file called langsetting here i am not getting value in session("lang") Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ci As CultureInfo Thread.CurrentThread.CurrentCulture = Session("lang") rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources")) ci = Thread.CurrentThread.CurrentCulture LoadStrings(ci) End Sub

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      anbusenthil wrote:

      Thread.CurrentThread.CurrentCulture = Session("lang")

      Where did you stored the Session("lang") value?

      cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

      A 1 Reply Last reply
      0
      • A anbusenthil

        tis is my code in class file called langsetting here i am not getting value in session("lang") Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ci As CultureInfo Thread.CurrentThread.CurrentCulture = Session("lang") rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources")) ci = Thread.CurrentThread.CurrentCulture LoadStrings(ci) End Sub

        P Offline
        P Offline
        Parwej Ahamad
        wrote on last edited by
        #3

        Are you getting any exception ? Are you sure to set the session value anywhere before using this place ?

        Parwej Ahamad http://parwej.wordpress.com/

        1 Reply Last reply
        0
        • A Abhijit Jana

          anbusenthil wrote:

          Thread.CurrentThread.CurrentCulture = Session("lang")

          Where did you stored the Session("lang") value?

          cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

          A Offline
          A Offline
          anbusenthil
          wrote on last edited by
          #4

          session("lang") is nothing i hav assigned value in a button click lik session("lang") = thread.currentthread.culture

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups