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. User Control in Master Page

User Control in Master Page

Scheduled Pinned Locked Moved ASP.NET
announcement
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.
  • T Offline
    T Offline
    Thomas Antony K
    wrote on last edited by
    #1

    Hai, I have a user control in my master page,which shows the company logo based on the language selected from the dropdown in the content page,the logo comes dynamically from different language folders,I update a session variable when I change the language in the dropdown,but when I update the language the user control is not getting refreshed,only reloading the page changes the logo. cheers, Thomas.

    P P 2 Replies Last reply
    0
    • T Thomas Antony K

      Hai, I have a user control in my master page,which shows the company logo based on the language selected from the dropdown in the content page,the logo comes dynamically from different language folders,I update a session variable when I change the language in the dropdown,but when I update the language the user control is not getting refreshed,only reloading the page changes the logo. cheers, Thomas.

      P Offline
      P Offline
      Padmanabh Ganorkar
      wrote on last edited by
      #2

      Hi Thomas, Add following code where you update the Session variable.

      Response.Redirect(Request.Url.ToString());

      Thanks, Padmanabh Ganorkar

      T 1 Reply Last reply
      0
      • T Thomas Antony K

        Hai, I have a user control in my master page,which shows the company logo based on the language selected from the dropdown in the content page,the logo comes dynamically from different language folders,I update a session variable when I change the language in the dropdown,but when I update the language the user control is not getting refreshed,only reloading the page changes the logo. cheers, Thomas.

        P Offline
        P Offline
        PCuong1983
        wrote on last edited by
        #3

        what your code ? :confused:

        1 Reply Last reply
        0
        • P Padmanabh Ganorkar

          Hi Thomas, Add following code where you update the Session variable.

          Response.Redirect(Request.Url.ToString());

          Thanks, Padmanabh Ganorkar

          T Offline
          T Offline
          Thomas Antony K
          wrote on last edited by
          #4

          Hai, if (ddl_language.SelectedItem.Value.ToString() != "0") { HttpCookie cookie = new HttpCookie("viterion_app_language"); cookie.Value = ddl_language.SelectedItem.Text.ToString(); cookie.Expires = System.DateTime.Now.AddDays(365); Response.Cookies.Add(cookie); } From this cookie, the session varible is updated in the master page through the init event. The code is HttpContext.Current.Session.Add("app_language", HttpContext.Current.Request.Cookies["viterion_app_language"].Value); cheers, Thomas.

          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