Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

 
Thread Tools Search this Thread
Old 02-03-2006, 07:49 PM   #1
Douglas J. Badin
 
Posts: n/a
Default asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Earlier this month, there was a posting about this without a definitive
answer.

If you place a Wizard inside a FormView's EditItemTemplate the bound fields
contained within the View will display the data from the fields to which
they are bound; yet they will return null values when the 'Update'
LinkButton is clicked.

The responder thought this might have something to do with naming
containers. If so, this is similar to an issue in Beta 2, Bug ID:
FDBK27772,
http://lab.msdn.microsoft.com/Produc...1-7e93b1d52077,
with naming containers (multiview, panel, etc) and fixed in a later build.

I checked, and it is works with MultiView.

Did the fix miss the Wizard or does this have nothing to do with naming
containers?

I want to use the built-in features of the Wizard rather than create my own
using MultiView.

Doug


  Reply With Quote
Old 02-06-2006, 09:02 AM   #2
Yuan Ren[MSFT]
 
Posts: n/a
Default RE: asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Hi Doug,

Thanks for posting!

For the current issue, my understanding is that the Wizard control has the
same problem with the MultiView control when place it into the FormView
control. If I have misunderstood anything, please let me know.

In this scenario, could you please give me a simple demo which can
reproduce the current problem? This will help me to perform the same test
exactly. I appreciate your understanding!

In addition, the Wizard control is the naming container control. So if some
naming container controls is fixed, I think the Wizard control also should
be fixed. That's why I need perform some tests. Thanks for your
understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

  Reply With Quote
Old 02-06-2006, 02:12 PM   #3
Douglas J. Badin
 
Posts: n/a
Default Re: asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Hi Yuan,

With the code below, try to update the Company Name with the Wizard and
MultiView examplex. The Wizard example post backs nulls.

Add a connection string to Web.config

<add name="LocalNWind"
connectionString="SERVER=(local);DATABASE=northwin d;INTEGRATED
SECURITY=sspi;" providerName="System.Data.SqlClient"/>

Multiview Example that works:
---------------------------------------------- MultiView Form after
here -------------------------------------------------------------------------
<form id="form1" runat="server">

<div>

<asp:FormView

ID="FormView1"

runat="server"

AllowPaging="true"

DataSourceID="SqlDataSource1"

DataKeyNames="CustomerID"

>


<ItemTemplate>

<TABLE border="1">

<TR>

<TD>

Company Name:

</TD>

<TD>

<asp:literal ID="litCompanyName" runat="server" Text='<%#
Eval("CompanyName") %>' />

</TD>

</TR>

<TR>

<TD>

Contact Name:

</TD>

<TD>

<asp:literal ID="litContactName" runat="server" Text='<%#
Eval("ContactName") %>' />

</TD>

</TR>

<TR>

<TD>

<asp:Button id="btnEdit" runat="server" text="Edit" CommandName="Edit"/>

</TD>

</TR>

</TABLE>

</ItemTemplate>

<EditItemTemplate>

<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">

<asp:View ID="View1" runat="server">

<TABLE border="1">

<TR>

<TD>

Company Name:

</TD>

<TD>

<asp:TextBox ID="txtCompanyName" runat="server" Text='<%#
Bind("CompanyName") %>' />

</TD>

</TR>

</TABLE>

</asp:View>

<asp:View ID="View2" runat="server">

<TABLE border="1">

<TR>

<TD>

Contact Name:

</TD>

<TD>

<asp:TextBox ID="txtContactName" runat="server" Text='<%#
Bind("ContactName") %>' />

</TD>

</TR>

</TABLE>

</asp:View>

</asp:MultiView>

<TABLE>

<TR>

<TD colspan="2">

<asp:Button id="btnUpdate" runat="server" text="Update"
CommandName="Update"/>

<asp:Button id="btnCancel" runat="server" text="Cancel"
CommandName="Cancel"/>

</TD>

</TR>

</TABLE>

</EditItemTemplate>

</asp:FormView>

<asp:SqlDataSource ID="SQLDataSource1" runat="server"

EnableCaching="True"

ConnectionString='<%$ ConnectionStrings:LocalNWind %>'

SelectCommand="SELECT CustomerID, CompanyName, ContactName FROM Customers"

UpdateCommand="UPDATE Customers SET CompanyName = @CompanyName, ContactName
= @ContactName WHERE CustomerID = @CustomerID">

<UpdateParameters>

<asparameter Name="CustomerID" />

<asparameter Name="CompanyName" />

<asparameter Name="ContactName" />

</UpdateParameters>

</asp:SqlDataSource>


</div>

</form>

---------------------------------------------- MultiView Form before
here -------------------------------------------------------------------------

Wizard Example that does not work:
---------------------------------------------- Wizard Form after
here -------------------------------------------------------------------------
<form id="form1" runat="server">

<div>

<asp:FormView

ID="FormView1"

runat="server"

AllowPaging="true"

DataSourceID="SqlDataSource1"

DataKeyNames="CustomerID"

>


<ItemTemplate>

<TABLE border="1">

<TR>

<TD>

Company Name:

</TD>

<TD>

<asp:literal ID="litCompanyName" runat="server" Text='<%#
Eval("CompanyName") %>' />

</TD>

</TR>

<TR>

<TD>

Contact Name:

</TD>

<TD>

<asp:literal ID="litContactName" runat="server" Text='<%#
Eval("ContactName") %>' />

</TD>

</TR>

<TR>

<TD>

<asp:Button id="btnEdit" runat="server" text="Edit" CommandName="Edit"/>

</TD>

</TR>

</TABLE>

</ItemTemplate>

<EditItemTemplate>

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Height="115px">

<WizardSteps>

<asp:WizardStep ID="WizardStep1" runat="server" Title="Company Name">

<TABLE border="1">

<TR>

<TD>

Company Name:

</TD>

<TD>

<asp:TextBox ID="txtCompanyName" runat="server" Text='<%#
Bind("CompanyName") %>' />

</TD>

</TR>

</TABLE>

</asp:WizardStep>

<asp:WizardStep ID="WizardStep2" runat="server" Title="Contact Name">

<TABLE border="1">

<TR>

<TD>

Contact Name:

</TD>

<TD>

<asp:TextBox ID="txtContactName" runat="server" Text='<%#
Bind("ContactName") %>' />

</TD>

</TR>

</TABLE>

</asp:WizardStep>

</WizardSteps>

<SideBarTemplate>

<aspataList ID="SideBarList" runat="server">

<SelectedItemStyle Font-Bold="True" />

<ItemTemplate>

<asp:LinkButton ID="SideBarButton" runat="server"></asp:LinkButton>

</ItemTemplate>

</aspataList>

</SideBarTemplate>

</asp:Wizard>

<TABLE>

<TR>

<TD colspan="2">

<asp:Button id="Button1" runat="server" text="Update" CommandName="Update"/>

<asp:Button id="Button2" runat="server" text="Cancel" CommandName="Cancel"/>

</TD>

</TR>

</TABLE>

</EditItemTemplate>

</asp:FormView>

<asp:SqlDataSource ID="SQLDataSource1" runat="server"

EnableCaching="True"

ConnectionString='<%$ ConnectionStrings:LocalNWind %>'

SelectCommand="SELECT CustomerID, CompanyName, ContactName FROM Customers"

UpdateCommand="UPDATE Customers SET CompanyName = @CompanyName, ContactName
= @ContactName WHERE CustomerID = @CustomerID">

<UpdateParameters>

<asparameter Name="CustomerID" />

<asparameter Name="CompanyName" />

<asparameter Name="ContactName" />

</UpdateParameters>

</asp:SqlDataSource>


</div>

</form>

---------------------------------------------- Wizard Form before
here -------------------------------------------------------------------------



""Yuan Ren[MSFT]"" <v-> wrote in message
news:...
> Hi Doug,
>
> Thanks for posting!
>
> For the current issue, my understanding is that the Wizard control has the
> same problem with the MultiView control when place it into the FormView
> control. If I have misunderstood anything, please let me know.
>
> In this scenario, could you please give me a simple demo which can
> reproduce the current problem? This will help me to perform the same test
> exactly. I appreciate your understanding!
>
> In addition, the Wizard control is the naming container control. So if
> some
> naming container controls is fixed, I think the Wizard control also should
> be fixed. That's why I need perform some tests. Thanks for your
> understanding!
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>



  Reply With Quote
Old 02-08-2006, 07:35 AM   #4
Yuan Ren[MSFT]
 
Posts: n/a
Default Re: asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Hi Doug,

Thanks for your reply!

I have performed the test and reproduced the current issue. I think maybe
the bug is not totally fixed for all naming container control. I suggest
you open a new case to the Microsoft PSS. Since the issue maybe is caused
by the product bug, you will not be charged for the case. The Microsoft PSS
will supply the workaround or hot fix for the current issue.

For your reference, I attached steps to contact Microsoft PSS here: You can
contact Microsoft Product Support directly to discuss additional support
options you may have available, by contacting us at 1-(800)936-5800 or by
choosing one of the options listed at
http://support.microsoft.com/common/...gp;en-us;offer
prophone

I appreciate your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support

  Reply With Quote
Old 02-08-2006, 10:40 PM   #5
Douglas J. Badin
 
Posts: n/a
Default Re: asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Hi Yuan,

I have opened a case with PSS.

Initial reaction from them is that it is a bug.

Thanks,

Doug

""Yuan Ren[MSFT]"" <v-> wrote in message
news:...
> Hi Doug,
>
> Thanks for your reply!
>
> I have performed the test and reproduced the current issue. I think maybe
> the bug is not totally fixed for all naming container control. I suggest
> you open a new case to the Microsoft PSS. Since the issue maybe is caused
> by the product bug, you will not be charged for the case. The Microsoft
> PSS
> will supply the workaround or hot fix for the current issue.
>
> For your reference, I attached steps to contact Microsoft PSS here: You
> can
> contact Microsoft Product Support directly to discuss additional support
> options you may have available, by contacting us at 1-(800)936-5800 or by
> choosing one of the options listed at
> http://support.microsoft.com/common/...gp;en-us;offer
> prophone
>
> I appreciate your understanding!
>
> Regards,
>
> Yuan Ren [MSFT]
> Microsoft Online Support
>



  Reply With Quote
Old 02-09-2006, 04:29 AM   #6
Yuan Ren[MSFT]
 
Posts: n/a
Default Re: asp:Wizard inside of a asp:FormView breacks two-way databinding (Round 4)

Hi Doug,

You are welcome

Yuan Ren [MSFT]
Microsoft Online Support

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco VPN Restrict Access by IP ? samirise Hardware 1 12-16-2007 02:17 PM
Spoke to Spoke Enhanced Config (ASA-PIX) NEED HELP ASAP!! T-Mak Hardware 1 10-27-2006 10:56 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47