Step 2 after Hello World. Sheesh.
I'm new to .net but not asp. I've worked through quite a bit for "Code-Beehind", but the following is tossing me. If anyone can clarify/enlighten it'll certainly brighten things up here.
1)in Asp I used onchange=formchanged(this) for editable controls. formchanged() would ensure the save button was enabled. ie as soon as the user makes a change they can save the form. but in .net ontextchange only happens on posting. Hmmm, enter onblur, good that should do it. But no, when I run the following aspx:
<asp:textbox id="txtFHIDFather" onblur="FormChanged()" tabIndex="8" runat="server" MaxLength="18"></asp:textbox>
and the attendant Code-Behind:
Public Sub FormChanged()
btnSave.Enabled = True
btnCancel.Enabled = True
I get a request to debug an "Object expected" error. Apparently, .net isn't seeing the FormChanged declared in the CB. I've got Pub Subs on buttons with OnClick and those kick off without trouble. OnClick enforces the passing of the ojbect and event parameters. So I presume that's why
they're working. What am I missing with onblur (and other onevents?) ?
2) Again, I'm quite the neophyte, so maybe I'm missing something. As good as .net is at autocompleteing and catching simple mistakes -- wouldn't it make sense that when a dev'er codes a "onsomething=AFunction()" clause that .net would verify AFunction() exists in the CodeBehind and add it if it wasn't there? -- Or at least ask if the dev'er wants it there?
3) the Runat attrib takes only 'server'. To take advantage/gain the greatest benefit do .net forms need to runat server? It seems the unburdening of the client and burdening the server would be a no-no.
Thank you folks. Hope you can help.
By Manoj Agarwal in forum .NET
Last Post: 04-18-2003, 03:33 PM
By Ross in forum VB Classic
Last Post: 03-09-2001, 11:38 AM
By Laserbeak in forum .NET
Last Post: 01-02-2001, 10:05 PM
By Shaun Higgins in forum Database
Last Post: 11-12-2000, 01:49 PM
By wrench wrench in forum Database
Last Post: 07-04-2000, 05:04 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center