B
Barry
I've wasted the whole day trying things and researching, but nothing is
working. I would *greatly* appreciate if someone can give me the
solution to this problem.
I'm using the .NET Framework 2.0 in C# with a Master page and
additional .aspx pages with .cs code-behind pages in Windows XP.
In an .aspx page I have declared a control as follows:
<asp:RadioButton runat="server" GroupName="rbtnS0"
ID="rbtnS0start" />
I want to do some event-side work whenever this RadioButton is clicked.
I've tried everything I've found, e.g., putting
rbtnS0start.Attributes.Add("OnClick", "rbtnS0start_Click();");
in the .cs file's Page_Load event, and then specifying
<script type="javascript">
function rbtnS0start_Click()
alert('test');
</script>
in the asp:Content section of the .aspx file. I get an "error on page"
from IE6 whenever I click that button. I've tried dozens of
combinations of things. (Unfortunately, there is no OnClick attribute
for an asp:RadioButton.)
Can someone *please* give me the code (and where it goes) so that I can
do client-side work when the user clicks an asp:RadioButton control?
Thank you *so much* to anyone who helps!
working. I would *greatly* appreciate if someone can give me the
solution to this problem.
I'm using the .NET Framework 2.0 in C# with a Master page and
additional .aspx pages with .cs code-behind pages in Windows XP.
In an .aspx page I have declared a control as follows:
<asp:RadioButton runat="server" GroupName="rbtnS0"
ID="rbtnS0start" />
I want to do some event-side work whenever this RadioButton is clicked.
I've tried everything I've found, e.g., putting
rbtnS0start.Attributes.Add("OnClick", "rbtnS0start_Click();");
in the .cs file's Page_Load event, and then specifying
<script type="javascript">
function rbtnS0start_Click()
alert('test');
</script>
in the asp:Content section of the .aspx file. I get an "error on page"
from IE6 whenever I click that button. I've tried dozens of
combinations of things. (Unfortunately, there is no OnClick attribute
for an asp:RadioButton.)
Can someone *please* give me the code (and where it goes) so that I can
do client-side work when the user clicks an asp:RadioButton control?
Thank you *so much* to anyone who helps!