Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Using asp.net and js, how can I override a System.Web.UI method depending on UserAgent = mobile

I need to change the method of using viewstate depending on whether the end user is on a mobile device. Changing the viewstate persistence location is working fine using the following script contained within the pages head section:

<script runat="server"> 
  protected override object LoadPageStateFromPersistenceMedium()
  {
      return Session["_ViewState"];
  }

  protected override void SavePageStateToPersistenceMedium(object viewState)
  {
          Session["_ViewState"] = viewState;
  }
</script>

What I need to do is make this script execution conditional upon whether the end user is using a mobile. There are many examples on how to detect whether it is a mobile or not but how do I make the above script section conditional upon the detection script's result?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda