R
Richard Morse
Hi! I have an aspx that I've created which has an asp:Button in it. I
would like to be able to change the OnClick handler at runtime
(basically, I want this form to either edit or create a record, and I
want to change the procedure it calls depending on what it should be
doing). However, apparently the .OnClick member is read only?
(Sample
<script language="jscript">
function do_edit() {
...
do_action_btn.Text = "Save";
do_action_btn.OnClick = "do_update";
}
....
</script>
<html>
<head>
</head>
<body>
<form id="page_form" runat="server" />
...
<asp:Button id="do_action_btn" runat="server" />
...
</form>
</body>
</html>
----------
Alternately, if the above isn't possible, I can do something with
CommandButtons, but without a repeater/datagrid/datalist, I'm not sure
where to put the "OnItemCommand" property...
Thanks muchly,
Ricky Morse
would like to be able to change the OnClick handler at runtime
(basically, I want this form to either edit or create a record, and I
want to change the procedure it calls depending on what it should be
doing). However, apparently the .OnClick member is read only?
(Sample
<script language="jscript">
function do_edit() {
...
do_action_btn.Text = "Save";
do_action_btn.OnClick = "do_update";
}
....
</script>
<html>
<head>
</head>
<body>
<form id="page_form" runat="server" />
...
<asp:Button id="do_action_btn" runat="server" />
...
</form>
</body>
</html>
----------
Alternately, if the above isn't possible, I can do something with
CommandButtons, but without a repeater/datagrid/datalist, I'm not sure
where to put the "OnItemCommand" property...
Thanks muchly,
Ricky Morse