468,532 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,532 developers. It's quick & easy.

No two-way databinding

I have a web page with a formview, and a multiview in the formview. When I
databind the values inside the multiview views, there is no option for
two-way databinding. The form populates fine, but when it calls the update
method, it calls it with no parameters.

Is there just no support for two-way databinding inside these controls, or
is there a technique I am missing?
Nov 19 '05 #1
6 3382
Two-Way databinding is supported in ASP.NET 2.0. In 1.1 upon postback you'll
have to map the values yourself manually.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a web page with a formview, and a multiview in the formview.
When I databind the values inside the multiview views, there is no
option for two-way databinding. The form populates fine, but when it
calls the update method, it calls it with no parameters.

Is there just no support for two-way databinding inside these
controls, or is there a technique I am missing?


Nov 19 '05 #2
Umm, since I am using a formview and a multiview, I am using ASP.Net 2.0
(unless these were added to ASP.Net 1.1 when I wasn't looking). It still
doesn't work in the scenario I described. Their is no option listed, and the
update method on the objecdatasource is called with nothing passed for each
parameter.

"Brock Allen" wrote:
Two-Way databinding is supported in ASP.NET 2.0. In 1.1 upon postback you'll
have to map the values yourself manually.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a web page with a formview, and a multiview in the formview.
When I databind the values inside the multiview views, there is no
option for two-way databinding. The form populates fine, but when it
calls the update method, it calls it with no parameters.

Is there just no support for two-way databinding inside these
controls, or is there a technique I am missing?


Nov 19 '05 #3
How are you databinding? If you use Eval, then that's still one-way. Change
your templates to use Bind and then you'll get the two-way behavior. The
quick starts go into this a bit. Maybe they'll help:

http://beta.asp.net/QUICKSTART/aspne...spx#twowaybind

-Brock
DevelopMentor
http://staff.develop.com/ballen
Umm, since I am using a formview and a multiview, I am using ASP.Net
2.0 (unless these were added to ASP.Net 1.1 when I wasn't looking).
It still doesn't work in the scenario I described. Their is no option
listed, and the update method on the objecdatasource is called with
nothing passed for each parameter.

"Brock Allen" wrote:
Two-Way databinding is supported in ASP.NET 2.0. In 1.1 upon postback
you'll have to map the values yourself manually.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a web page with a formview, and a multiview in the formview.
When I databind the values inside the multiview views, there is no
option for two-way databinding. The form populates fine, but when
it calls the update method, it calls it with no parameters.

Is there just no support for two-way databinding inside these
controls, or is there a technique I am missing?


Nov 19 '05 #4
I am using Bind, which is the default when using Visual Studio. I even tried
setting the bind method in the custom setting. It works fine on a form when
the controls are not in the multiview control. When I use the multiview is
when I run into a problem. There are too many controls for me to display to
the user all at once, which is why I am using the multiview.

I just found it on the bug reports, so aparently this is a bug with ASP.Net
2.0. Any time a control is in a container it does not bind properly. I will
need to code around this until RTM.

"Brock Allen" wrote:
How are you databinding? If you use Eval, then that's still one-way. Change
your templates to use Bind and then you'll get the two-way behavior. The
quick starts go into this a bit. Maybe they'll help:

http://beta.asp.net/QUICKSTART/aspne...spx#twowaybind

-Brock
DevelopMentor
http://staff.develop.com/ballen
Umm, since I am using a formview and a multiview, I am using ASP.Net
2.0 (unless these were added to ASP.Net 1.1 when I wasn't looking).
It still doesn't work in the scenario I described. Their is no option
listed, and the update method on the objecdatasource is called with
nothing passed for each parameter.

"Brock Allen" wrote:
Two-Way databinding is supported in ASP.NET 2.0. In 1.1 upon postback
you'll have to map the values yourself manually.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have a web page with a formview, and a multiview in the formview.
When I databind the values inside the multiview views, there is no
option for two-way databinding. The form populates fine, but when
it calls the update method, it calls it with no parameters.

Is there just no support for two-way databinding inside these
controls, or is there a technique I am missing?


Nov 19 '05 #5
> I just found it on the bug reports, so aparently this is a bug with
ASP.Net 2.0. Any time a control is in a container it does not bind
properly. I will need to code around this until RTM.


Oh yes, this does ring a bell. I think the problem was that FindControl doesn't
work for a MultiView, since the child controls are contained in one of the
views. Thus on postback when trying to find the posted controls it wasn't
able to... ick.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #6
On kind of a different subject, it seems a little silly that the controls
added are not accessible in the codebehind like they were in 1.1. I have to
use Formview1.FindControl("Multiview1!View!Textbox1") to find a text box
placed on the view. This is true with any "naming container" including
panels. I still haven't figured out how to rig events to these controls
(AddHandler after finding control maybe?).
"Brock Allen" wrote:
I just found it on the bug reports, so aparently this is a bug with
ASP.Net 2.0. Any time a control is in a container it does not bind
properly. I will need to code around this until RTM.


Oh yes, this does ring a bell. I think the problem was that FindControl doesn't
work for a MultiView, since the child controls are contained in one of the
views. Thus on postback when trying to find the posted controls it wasn't
able to... ick.

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Jamey Cribbs | last post: by
8 posts views Thread by John Grenier | last post: by
6 posts views Thread by Laura K | last post: by
8 posts views Thread by Michael Schwarz | last post: by
13 posts views Thread by paul.joseph.davis | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.