locked
Making page or its content read only during Page Load RRS feed

  • Question

  • User1289875885 posted

    Hi,

    I have one many links and buttons in a page that link are reffering some hidden fields which are at the end of the page.

    During load of the page the link is appearing and when i go and click the link then i am getting error "object not defiend"

    that is, it is not able to find the hidden field which is at the end of the page and yet to be loaded.

    so it is wiered behaviour and show stopper for my project.

    is there any way i can disable the page till the page gets loaded.

    or can i do some  check whether the perticular hidden field is loaded or not so that once the user clicks on the link button i can show him needful message.

    instead of showing him the error.

     

    any prompt suggestions are welcomed.

     

    Thanks in  advance....

    Monday, December 1, 2008 10:06 AM

Answers

  • User-1726590844 posted

    Hi roopkt

    I have one many links and buttons in a page that link are reffering some hidden fields which are at the end of the page.

    I am not sure I fully understand. What do you mean by "the buttons refer to hidden fields"? Once the user sees the page and is able to click a button or link, the hidden fields are certainly initialized if they ever get initialized during the first page load (!IsPostBack).

    If you want to disable your controls (buttons, links, ...) you can do this by setting the "Enabled" property of them to "false" during Page_Load (or OnPageLoad if you override it). E.g.

    if(!IsPostBack) {

        myButton.Enabled = false;

    }

    Does this help?

     

    Rgds

    guybrush

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 2, 2008 3:43 AM

All replies

  • User-1726590844 posted

    Hi roopkt

    I have one many links and buttons in a page that link are reffering some hidden fields which are at the end of the page.

    I am not sure I fully understand. What do you mean by "the buttons refer to hidden fields"? Once the user sees the page and is able to click a button or link, the hidden fields are certainly initialized if they ever get initialized during the first page load (!IsPostBack).

    If you want to disable your controls (buttons, links, ...) you can do this by setting the "Enabled" property of them to "false" during Page_Load (or OnPageLoad if you override it). E.g.

    if(!IsPostBack) {

        myButton.Enabled = false;

    }

    Does this help?

     

    Rgds

    guybrush

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 2, 2008 3:43 AM
  • User1289875885 posted

    Thats a good idea but, i did use different thing I tried with javascript function that I called at onpageload that method will check all the controls whether they initialized or not. Till the time it will display some animated image.

    Rightnow  I am managing with this only.

    Thanks for your valuable suggestion.

    Friday, December 5, 2008 2:26 AM
  • User-78878556 posted

    HI Rupesh,

    can you please explain about your solution?

    Or the current javascript function that you are using.

    I need to impliment it too.

    Pradvk (india)


    >Thats a good idea but, i did use different thing I tried with javascript function that I called at onpageload that method will check all the controls whether they initialized or not. Till the time >it will display some animated image. Rightnow I am managing with this only. Thanks for your valuable suggestion.

    >Rupesh kumar Tiwari India

    Tuesday, November 24, 2009 1:36 AM