View Full Version : formview and ontextchanged ignored

09-24-2011, 12:07 AM
Is there any special interaction between a formview and the attribs: ontextchanged or onchanged?

It seems they are completely usurped by a <requiredfieldvalidator> based on the textbox. (In that case I got no reaction at all)

When I tried it on a textbox with out any extras:

First:<asp:TextBox ID="txtFirst" runat="server" AutoPostBack=true Text='<%# Bind("First") %>' ontextchange=EnablebtnSave/>

if EnablebtnSave was in quotes I got a type mismatch from javascript.

But, take off the quotes -- I'm back to zero reaction. I'm expecting a msgbox popup (via the codebehind):

Protected Sub EnablebtnSave(ByVal sender As Object, ByVal e As System.EventArgs)
Dim btnTemp As Object
btnTemp = sender.FindControl("btnSave")
btnTemp.disabled = False
End Sub

This seems to be not unusual request for help (given my public searches) -- but the answers are always simply obvious (you need to actually change something in the txtbox, be sure there're no typos etc.)
I'm pretty sure I've got no typos here and I am changing the contents and moving off the focus. So why doesn't the event fire?

thank you for your input!