-
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
End Sub
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.
B
Similar Threads
-
By Manoj Agarwal in forum .NET
Replies: 1
Last Post: 04-18-2003, 03:33 PM
-
By Ross in forum VB Classic
Replies: 1
Last Post: 03-09-2001, 11:38 AM
-
By Laserbeak in forum .NET
Replies: 0
Last Post: 01-02-2001, 10:05 PM
-
By Shaun Higgins in forum Database
Replies: 3
Last Post: 11-12-2000, 01:49 PM
-
By wrench wrench in forum Database
Replies: 0
Last Post: 07-04-2000, 05:04 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks