Databinding User Controls

D

Daisy

I've got a load of databound controls, and call .DataBind() *once*, in the
Page_Load in my derived page class.

This seems to fire after Page_Load, which is good for the Edit Profile pages
and such. My control has it's User propert bound, and so the Save Button
event, can just change properties on the already-created object and then
..Save().

My problem, however, is the login. My Login button event is fired after
Page_Load, and therefore after daatbinding, so by the time the Login code is
run, I've missed the databinding, and it's only on the second page hit, that
you see you're actually logged in.

What's the best way around something like this? Calling DataBind on the page
multiple times seems a bit sloppy, but I can't think of any nice ways around
it :-\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top