W
wardy1975
Hi all....looking for a bit of help here....I'm using an asp.net server
side button, and trying to add an onclick event on the button to call a
javascript function. However, I am trying to enter the onclick syntax
directly in the html instead of via the attributes.add functionality
(this is required due to the dynamic nature of how the buttons are
added to the screen). The problem is, I get a compilation error when I
try to load the page that the first word I have in the onclick
definition "is not a member of " and my page name.
So, if I had the code below in a webform called Webform4.aspx:
<asp:button id="btnClearSubmit" onclick="testfn();" runat="server"
commandname="submit" cssclass="test"
text="Clear List">
I get the compliation error:
Compiler Error Message: BC30456: 'testfn' is not a member of
'ASP.WebForm4_aspx'.
Anyone ever run into this before? Am I doing something wrong? In my
mind I would have thought that entering an onclick definition directly
in the html should still work for server side buttons.
Thanks
side button, and trying to add an onclick event on the button to call a
javascript function. However, I am trying to enter the onclick syntax
directly in the html instead of via the attributes.add functionality
(this is required due to the dynamic nature of how the buttons are
added to the screen). The problem is, I get a compilation error when I
try to load the page that the first word I have in the onclick
definition "is not a member of " and my page name.
So, if I had the code below in a webform called Webform4.aspx:
<asp:button id="btnClearSubmit" onclick="testfn();" runat="server"
commandname="submit" cssclass="test"
text="Clear List">
I get the compliation error:
Compiler Error Message: BC30456: 'testfn' is not a member of
'ASP.WebForm4_aspx'.
Anyone ever run into this before? Am I doing something wrong? In my
mind I would have thought that entering an onclick definition directly
in the html should still work for server side buttons.
Thanks