I am using javascript to validate on the click of this button and I want to set the disabled property in js and also server side so I initialise as below
I would call an asp.net sub instead of the javascript, use registerclientscriptblock for the javascript and set the link button's autopostback = false.
Does it make any difference if you set the Enabled property of the link button istelf rather than using FindControl and setting it's disabled attribute? e.g.
If it works then yes although you will have to create a way of adding it back in though.
If you are simply enabling/disabling a linkbutton though maybe you should consider only doing it server side and having it postback to set the Enabled property. Posting back isn't a bad thing if it is only setting a property and will be quite quick.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.