472,958 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

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 3527
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jamey Cribbs | last post by:
At the risk of calling my manhood into question, I humbly submit the following little diddy (which is a blatant rip-off of a heart wrenching melody of the '70s by that international superstar, Mary...
8
by: John Grenier | last post by:
Hi, I have to determine the "standing" (WIN - TIE - LOSS) from confrontations between two teams on a contest. The table matchResults has fields cont_id, team_id and contest_result (int). ...
6
by: Willem | last post by:
Hi, I have a newbie question: is it possible to make a search form in asp that searches in two different databases (access)? Willem
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
9
by: Steven | last post by:
Hello, I have a question about strcmp(). I have four words, who need to be compared if it were two strings. I tried adding the comparison values like '(strcmp(w1, w2) + strcmp(w3, w4))', where...
6
by: Laura K | last post by:
This is probably a simple question but I want to make sure I am doing it right. I have a spoc with two select statements which results in two tables. Very Basic ...
3
by: Simon | last post by:
Dear reader, For matching of two fields it is required that the fields has the same content. But now I have the situation that two text fields has not precisely the same content but there...
8
by: Michael Schwarz | last post by:
Hi, I have a problem where I have two requests (i.e. two different windows that are using the same session) that are accessing the session collection. The requests will need more time on the...
13
by: paul.joseph.davis | last post by:
Hi, I've just had my first encounter with two-phase lookup and I'm scratching my head a bit. The idea behind two phase look up is pretty easy to understand, but I have a case that fails to...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.