Executing client script before page load

Discussion in 'ASP .Net Building Controls' started by Eric Livingston, Jan 23, 2008.

  1. I'm working on a custom server control that inherits from textbox. I want to
    use the control to display a datetime object using the appropriate timezone
    offset for the client.

    Using ClientScriptManager.RegisterHiddenField, I've got a place to store the
    value returned by the js getTimezoneOffset. However, I need to execute the
    client script as early as possible in the page lifecycle to retrieve that
    value so that it is available in the code behind by the time the page load
    event fires.

    Any suggestions?

    Thanks!
     
    Eric Livingston, Jan 23, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.