V
Vince
I'm using VS 2003 and I have a button in a page where I've used
"btnViewData.Attributes.Add ("onclick", "javascript:return doPostBack
(\"" + btnViewData.ClientID + "\");");"
to have it execute some javascript before posting back. It works fine
in the page and executes my javascript, and then executes its
server-side event. I'm trying to reuse most of the page's controls
across several pages, but when I move the button from the page into a
user control, the button correctly fires my javascript function, but no
longer fires its server-side Click event, even though I see that the
page's Request.Params[0] correctly points to my control.
In trying to find workarounds, I tried dynamically modifying the
button's onclick event in the page's onLoad event, and then it does fire
the server-side event, however it bypasses my javascript function.
Any ideas why this is happening and how I can fix it?
Thanks in advance,
Vince
"btnViewData.Attributes.Add ("onclick", "javascript:return doPostBack
(\"" + btnViewData.ClientID + "\");");"
to have it execute some javascript before posting back. It works fine
in the page and executes my javascript, and then executes its
server-side event. I'm trying to reuse most of the page's controls
across several pages, but when I move the button from the page into a
user control, the button correctly fires my javascript function, but no
longer fires its server-side Click event, even though I see that the
page's Request.Params[0] correctly points to my control.
In trying to find workarounds, I tried dynamically modifying the
button's onclick event in the page's onLoad event, and then it does fire
the server-side event, however it bypasses my javascript function.
Any ideas why this is happening and how I can fix it?
Thanks in advance,
Vince