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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Masterpage won't postback in firefox

Masterpage won't postback in firefox

Scheduled Pinned Locked Moved ASP.NET
helpquestionlearning
2 Posts 1 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.
  • D Offline
    D Offline
    daniel__c
    wrote on last edited by
    #1

    Hey All, Have had a search around for others having this problem and haven't been able to find a fix or workaround. I have a site using masterpages - and i am putting a link to logout in the master page, using a handler in the code behind. So in the masterpage would be:

    then code behind: protected void Logout_Click(object sender, EventArgs e){ DoSomething(); } (I have also tested using an ID for Logout link button and attaching to the click event OnInit but that doesn't seem to make much difference either) So i would expect this to work as usual, which it does in IE - but firefox doesn't like it and won't postback when the button is clicked. And of course it has to be firefox compatible. I have also tried moving the link into a seperate control so that the handler is not in the masterpage code behind and loading just the control into the masterpage and this doesn't work either. It seems like buttons won't fire events unless they are in the content place holders - not directly in the masterpage. Has anyone seen this problem - and is there a workaround to get the postback to fire in firefox? Thanks in advance for any help.

    D 1 Reply Last reply
    0
    • D daniel__c

      Hey All, Have had a search around for others having this problem and haven't been able to find a fix or workaround. I have a site using masterpages - and i am putting a link to logout in the master page, using a handler in the code behind. So in the masterpage would be:

      then code behind: protected void Logout_Click(object sender, EventArgs e){ DoSomething(); } (I have also tested using an ID for Logout link button and attaching to the click event OnInit but that doesn't seem to make much difference either) So i would expect this to work as usual, which it does in IE - but firefox doesn't like it and won't postback when the button is clicked. And of course it has to be firefox compatible. I have also tried moving the link into a seperate control so that the handler is not in the masterpage code behind and loading just the control into the masterpage and this doesn't work either. It seems like buttons won't fire events unless they are in the content place holders - not directly in the masterpage. Has anyone seen this problem - and is there a workaround to get the postback to fire in firefox? Thanks in advance for any help.

      D Offline
      D Offline
      daniel__c
      wrote on last edited by
      #2

      Ok, have worked out what is causing the problem.. The

      element had an id on it "Form1", i removed the id and it is now working. Haven't run into this one before, but usually working with IE - which doesn't have a problem with it.

      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