call javascript function from button
-
i have this button on my asp.net page, all i wanr with the button is to call a javascript function which is on a separate script. how can i called a function on the script called ValidateControl from clicking a button Thanks you vry much
Nothing different... Like you are calling an inline java script function.. in page load give Butten1.Attributes.Add("onclick","javascript:ValidateControl()") thats all
To succeed, we must first believe that we can. Sherin Iranimose
-
Nothing different... Like you are calling an inline java script function.. in page load give Butten1.Attributes.Add("onclick","javascript:ValidateControl()") thats all
To succeed, we must first believe that we can. Sherin Iranimose
-
Nothing different... Like you are calling an inline java script function.. in page load give Butten1.Attributes.Add("onclick","javascript:ValidateControl()") thats all
To succeed, we must first believe that we can. Sherin Iranimose
Sherin Iranimose wrote:
in page load give Butten1.Attributes.Add("onclick","javascript:ValidateControl()")
Only, you don't use the "javascript:" protocol when you don't put the code in an url.
Button1.Attributes.Add("onclick","ValidateControl();")
or in framework 2:Button1.OnClientClick = "ValidateControl();"
--- single minded; short sighted; long gone;