![]() |
|
|
|||||||
![]() |
ASP Net - Problem using a FormView with an HTML table in Edit/Insert templat |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi, I have a problem with bindings in a formview.
I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the sqldatasource of the formview. If i put this textboxes outside the table everything works well, but as soon as i put them inside the table (in order to organize the layout in the right way) they doesn't work. They works only as eval() and not bind() and so when i perform the saveclick i have only null values. I think this is a bug of visualstudio2005 because when i drag those textboxes outside the table thy are again bound to the sqldatasource and the save method works in the right way and i have no more null values. I've found the same problem also with a simple formview with a panel and a table in the insert or edit template. Please help me because i don't know how to proceed! Best Regards -- ing. Lorenzo Margola it2b s.r.l. =?Utf-8?B?TG9yZW56aW5v?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Lorenzino,
Please post a bit of your code so we can review your code. I use tables in a formview to manage the layout and it works fine with me. "Lorenzino" wrote: > Hi, I have a problem with bindings in a formview. > I have a formview; in the insert template i've created a wizard control and > inside > it i have an HTML table with some textboxes bound to the sqldatasource of > the > formview. > If i put this textboxes outside the table everything works well, but as soon > as i put them inside the table (in order to organize the layout in the right > way) > they doesn't work. They works only as eval() and not bind() and so when i > perform the saveclick i have only null values. I think this is a bug of > visualstudio2005 because when i drag those textboxes outside the table thy > are again bound to the sqldatasource and the save method works in the right > way and i have no more null values. > I've found the same problem also with a simple formview with a panel and a > table in the insert or edit template. > > Please help me because i don't know how to proceed! > > Best Regards > -- > ing. Lorenzo Margola > it2b s.r.l. =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZQ==?= |
|
|
|
#3 |
|
Posts: n/a
|
Hi Dustin,
thanks for your interest! Posting you some code it's quite difficult because the FormView is inserted in a complex module in a ASPNET-pages-portal-framework and will not work standalone. I can explain you an easy way to simulate the problem: create a FormView in a common ASP.NET page that has a simple SqlDataSource mapped on a simple DB table (with Insert/Update/Delete capabilities). Then insert a Wizard ASP.NET control and put some autogenerated TextBox of the FormView Edit template field in it (i.e. 2 textbox on each wizard step). If you try now your solution it'll work fine (in Edit you can use the wizard to collect user input). Then put an HTML table in one wizard step to organize the layout of the wizard step (i.e. a 2 columns table: 1° column label of the field, 2° column textbox to collect the user entry). If now you restart your solution you'll notice that the formview stops to work in the right way (it's unable to bind the textbox with the parameter of the SqlDataSource) Thanks Lorenzino -- ing. Lorenzo Margola it2b s.r.l. "Dustin van de Sande" wrote: > Lorenzino, > > Please post a bit of your code so we can review your code. > I use tables in a formview to manage the layout and it works fine with me. > > "Lorenzino" wrote: > > > Hi, I have a problem with bindings in a formview. > > I have a formview; in the insert template i've created a wizard control and > > inside > > it i have an HTML table with some textboxes bound to the sqldatasource of > > the > > formview. > > If i put this textboxes outside the table everything works well, but as soon > > as i put them inside the table (in order to organize the layout in the right > > way) > > they doesn't work. They works only as eval() and not bind() and so when i > > perform the saveclick i have only null values. I think this is a bug of > > visualstudio2005 because when i drag those textboxes outside the table thy > > are again bound to the sqldatasource and the save method works in the right > > way and i have no more null values. > > I've found the same problem also with a simple formview with a panel and a > > table in the insert or edit template. > > > > Please help me because i don't know how to proceed! > > > > Best Regards > > -- > > ing. Lorenzo Margola > > it2b s.r.l. =?Utf-8?B?TG9yZW56aW5v?= |
|
|
|
#4 |
|
Posts: n/a
|
Lorenzino,
Your welcome. I tried to reproduce the problem you describe, but I can't. It still works: <asp:Wizard ID="Wizard1" runat="server" Width="237px"> <WizardSteps> <asp:WizardStep runat="server" Title="Step 1"> <asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" DataSourceID="SqlDataSource1" OnModeChanged="FormView1_ModeChanged" OnPreRender="FormView1_PreRender"> <EditItemTemplate> <table> <tr> <td style="width: 100px"> ProductName: </td> <td style="width: 100px"> <asp:TextBox ID="ProductNameTextBox" runat="server" Text='<%# Bind("ProductName") %>'> </asp:TextBox></td> etc. Is this piece of code above simular to what you describe, of do I misunderstand? Maybe you can still post a part of your aspx like the code above to further explain your situation? "Lorenzino" wrote: > Hi Dustin, > thanks for your interest! > Posting you some code it's quite difficult because the FormView is inserted > in a complex module in a ASPNET-pages-portal-framework and will not work > standalone. I can explain you an easy way to simulate the problem: > create a FormView in a common ASP.NET page that has a simple SqlDataSource > mapped on a simple DB table (with Insert/Update/Delete capabilities). Then > insert a Wizard ASP.NET control and put some autogenerated TextBox of the > FormView Edit template field in it (i.e. 2 textbox on each wizard step). If > you try now your solution it'll work fine (in Edit you can use the wizard to > collect user input). Then put an HTML table in one wizard step to organize > the layout of the wizard step (i.e. a 2 columns table: 1° column label of the > field, 2° column textbox to collect the user entry). If now you restart your > solution you'll notice that the formview stops to work in the right way (it's > unable to bind the textbox with the parameter of the SqlDataSource) > Thanks > > Lorenzino > -- > ing. Lorenzo Margola > it2b s.r.l. > > > "Dustin van de Sande" wrote: > > > Lorenzino, > > > > Please post a bit of your code so we can review your code. > > I use tables in a formview to manage the layout and it works fine with me. > > > > "Lorenzino" wrote: > > > > > Hi, I have a problem with bindings in a formview. > > > I have a formview; in the insert template i've created a wizard control and > > > inside > > > it i have an HTML table with some textboxes bound to the sqldatasource of > > > the > > > formview. > > > If i put this textboxes outside the table everything works well, but as soon > > > as i put them inside the table (in order to organize the layout in the right > > > way) > > > they doesn't work. They works only as eval() and not bind() and so when i > > > perform the saveclick i have only null values. I think this is a bug of > > > visualstudio2005 because when i drag those textboxes outside the table thy > > > are again bound to the sqldatasource and the save method works in the right > > > way and i have no more null values. > > > I've found the same problem also with a simple formview with a panel and a > > > table in the insert or edit template. > > > > > > Please help me because i don't know how to proceed! > > > > > > Best Regards > > > -- > > > ing. Lorenzo Margola > > > it2b s.r.l. =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZQ==?= |
|
|
|
#5 |
|
Posts: n/a
|
Hi Dustin,
probably i was not clear in my description: the problem is to insert a Wizard in a FormView not the FormView in the WizardStep lorenzo -- ing. Lorenzo Margola it2b s.r.l. "Dustin van de Sande" wrote: > Lorenzino, > > Your welcome. I tried to reproduce the problem you describe, but I can't. It > still works: > > <asp:Wizard ID="Wizard1" runat="server" Width="237px"> > <WizardSteps> > <asp:WizardStep runat="server" Title="Step 1"> > <asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" > DataSourceID="SqlDataSource1" > OnModeChanged="FormView1_ModeChanged" > OnPreRender="FormView1_PreRender"> > <EditItemTemplate> > <table> > <tr> > <td style="width: 100px"> > ProductName: > </td> > <td style="width: 100px"> > <asp:TextBox ID="ProductNameTextBox" runat="server" > Text='<%# Bind("ProductName") %>'> > </asp:TextBox></td> > etc. > > Is this piece of code above simular to what you describe, of do I > misunderstand? Maybe you can still post a part of your aspx like the code > above to further explain your situation? > > "Lorenzino" wrote: > > > Hi Dustin, > > thanks for your interest! > > Posting you some code it's quite difficult because the FormView is inserted > > in a complex module in a ASPNET-pages-portal-framework and will not work > > standalone. I can explain you an easy way to simulate the problem: > > create a FormView in a common ASP.NET page that has a simple SqlDataSource > > mapped on a simple DB table (with Insert/Update/Delete capabilities). Then > > insert a Wizard ASP.NET control and put some autogenerated TextBox of the > > FormView Edit template field in it (i.e. 2 textbox on each wizard step). If > > you try now your solution it'll work fine (in Edit you can use the wizard to > > collect user input). Then put an HTML table in one wizard step to organize > > the layout of the wizard step (i.e. a 2 columns table: 1° column label of the > > field, 2° column textbox to collect the user entry). If now you restart your > > solution you'll notice that the formview stops to work in the right way (it's > > unable to bind the textbox with the parameter of the SqlDataSource) > > Thanks > > > > Lorenzino > > -- > > ing. Lorenzo Margola > > it2b s.r.l. > > > > > > "Dustin van de Sande" wrote: > > > > > Lorenzino, > > > > > > Please post a bit of your code so we can review your code. > > > I use tables in a formview to manage the layout and it works fine with me. > > > > > > "Lorenzino" wrote: > > > > > > > Hi, I have a problem with bindings in a formview. > > > > I have a formview; in the insert template i've created a wizard control and > > > > inside > > > > it i have an HTML table with some textboxes bound to the sqldatasource of > > > > the > > > > formview. > > > > If i put this textboxes outside the table everything works well, but as soon > > > > as i put them inside the table (in order to organize the layout in the right > > > > way) > > > > they doesn't work. They works only as eval() and not bind() and so when i > > > > perform the saveclick i have only null values. I think this is a bug of > > > > visualstudio2005 because when i drag those textboxes outside the table thy > > > > are again bound to the sqldatasource and the save method works in the right > > > > way and i have no more null values. > > > > I've found the same problem also with a simple formview with a panel and a > > > > table in the insert or edit template. > > > > > > > > Please help me because i don't know how to proceed! > > > > > > > > Best Regards > > > > -- > > > > ing. Lorenzo Margola > > > > it2b s.r.l. =?Utf-8?B?TG9yZW56aW5v?= |
|
|
|
#6 |
|
Posts: n/a
|
You are right. It doesn't work.
http://lab.msdn.microsoft.com/produc...3-21dfc795671b I'm afraid you will have to create this yourself, by creating a wizard and in the final_button_click fill all the fields in the previous steps into a record and insert it into the DB. "Lorenzino" wrote: > Hi Dustin, > probably i was not clear in my description: the problem is to insert a > Wizard in a FormView not the FormView in the WizardStep > > lorenzo > -- > ing. Lorenzo Margola > it2b s.r.l. > > > "Dustin van de Sande" wrote: > > > Lorenzino, > > > > Your welcome. I tried to reproduce the problem you describe, but I can't. It > > still works: > > > > <asp:Wizard ID="Wizard1" runat="server" Width="237px"> > > <WizardSteps> > > <asp:WizardStep runat="server" Title="Step 1"> > > <asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" > > DataSourceID="SqlDataSource1" > > OnModeChanged="FormView1_ModeChanged" > > OnPreRender="FormView1_PreRender"> > > <EditItemTemplate> > > <table> > > <tr> > > <td style="width: 100px"> > > ProductName: > > </td> > > <td style="width: 100px"> > > <asp:TextBox ID="ProductNameTextBox" runat="server" > > Text='<%# Bind("ProductName") %>'> > > </asp:TextBox></td> > > etc. > > > > Is this piece of code above simular to what you describe, of do I > > misunderstand? Maybe you can still post a part of your aspx like the code > > above to further explain your situation? > > > > "Lorenzino" wrote: > > > > > Hi Dustin, > > > thanks for your interest! > > > Posting you some code it's quite difficult because the FormView is inserted > > > in a complex module in a ASPNET-pages-portal-framework and will not work > > > standalone. I can explain you an easy way to simulate the problem: > > > create a FormView in a common ASP.NET page that has a simple SqlDataSource > > > mapped on a simple DB table (with Insert/Update/Delete capabilities). Then > > > insert a Wizard ASP.NET control and put some autogenerated TextBox of the > > > FormView Edit template field in it (i.e. 2 textbox on each wizard step). If > > > you try now your solution it'll work fine (in Edit you can use the wizard to > > > collect user input). Then put an HTML table in one wizard step to organize > > > the layout of the wizard step (i.e. a 2 columns table: 1° column label of the > > > field, 2° column textbox to collect the user entry). If now you restart your > > > solution you'll notice that the formview stops to work in the right way (it's > > > unable to bind the textbox with the parameter of the SqlDataSource) > > > Thanks > > > > > > Lorenzino > > > -- > > > ing. Lorenzo Margola > > > it2b s.r.l. > > > > > > > > > "Dustin van de Sande" wrote: > > > > > > > Lorenzino, > > > > > > > > Please post a bit of your code so we can review your code. > > > > I use tables in a formview to manage the layout and it works fine with me. > > > > > > > > "Lorenzino" wrote: > > > > > > > > > Hi, I have a problem with bindings in a formview. > > > > > I have a formview; in the insert template i've created a wizard control and > > > > > inside > > > > > it i have an HTML table with some textboxes bound to the sqldatasource of > > > > > the > > > > > formview. > > > > > If i put this textboxes outside the table everything works well, but as soon > > > > > as i put them inside the table (in order to organize the layout in the right > > > > > way) > > > > > they doesn't work. They works only as eval() and not bind() and so when i > > > > > perform the saveclick i have only null values. I think this is a bug of > > > > > visualstudio2005 because when i drag those textboxes outside the table thy > > > > > are again bound to the sqldatasource and the save method works in the right > > > > > way and i have no more null values. > > > > > I've found the same problem also with a simple formview with a panel and a > > > > > table in the insert or edit template. > > > > > > > > > > Please help me because i don't know how to proceed! > > > > > > > > > > Best Regards > > > > > -- > > > > > ing. Lorenzo Margola > > > > > it2b s.r.l. =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZSBbTUNBRF0=?= |
|
|
|
#7 |
|
Posts: n/a
|
In the link you sent me i read it would be fixed in the final release... i'm
using the last version of VS but the is still there with the wizard control Do I have to report the bug? Thanks for your help Lore -- ing. Lorenzo Margola it2b s.r.l. "Dustin van de Sande [MCAD]" wrote: > You are right. It doesn't work. > http://lab.msdn.microsoft.com/produc...3-21dfc795671b > > I'm afraid you will have to create this yourself, by creating a wizard and > in the final_button_click fill all the fields in the previous steps into a > record and insert it into the DB. > > "Lorenzino" wrote: > > > Hi Dustin, > > probably i was not clear in my description: the problem is to insert a > > Wizard in a FormView not the FormView in the WizardStep > > > > lorenzo > > -- > > ing. Lorenzo Margola > > it2b s.r.l. > > > > > > "Dustin van de Sande" wrote: > > > > > Lorenzino, > > > > > > Your welcome. I tried to reproduce the problem you describe, but I can't. It > > > still works: > > > > > > <asp:Wizard ID="Wizard1" runat="server" Width="237px"> > > > <WizardSteps> > > > <asp:WizardStep runat="server" Title="Step 1"> > > > <asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" > > > DataSourceID="SqlDataSource1" > > > OnModeChanged="FormView1_ModeChanged" > > > OnPreRender="FormView1_PreRender"> > > > <EditItemTemplate> > > > <table> > > > <tr> > > > <td style="width: 100px"> > > > ProductName: > > > </td> > > > <td style="width: 100px"> > > > <asp:TextBox ID="ProductNameTextBox" runat="server" > > > Text='<%# Bind("ProductName") %>'> > > > </asp:TextBox></td> > > > etc. > > > > > > Is this piece of code above simular to what you describe, of do I > > > misunderstand? Maybe you can still post a part of your aspx like the code > > > above to further explain your situation? > > > > > > "Lorenzino" wrote: > > > > > > > Hi Dustin, > > > > thanks for your interest! > > > > Posting you some code it's quite difficult because the FormView is inserted > > > > in a complex module in a ASPNET-pages-portal-framework and will not work > > > > standalone. I can explain you an easy way to simulate the problem: > > > > create a FormView in a common ASP.NET page that has a simple SqlDataSource > > > > mapped on a simple DB table (with Insert/Update/Delete capabilities). Then > > > > insert a Wizard ASP.NET control and put some autogenerated TextBox of the > > > > FormView Edit template field in it (i.e. 2 textbox on each wizard step). If > > > > you try now your solution it'll work fine (in Edit you can use the wizard to > > > > collect user input). Then put an HTML table in one wizard step to organize > > > > the layout of the wizard step (i.e. a 2 columns table: 1° column label of the > > > > field, 2° column textbox to collect the user entry). If now you restart your > > > > solution you'll notice that the formview stops to work in the right way (it's > > > > unable to bind the textbox with the parameter of the SqlDataSource) > > > > Thanks > > > > > > > > Lorenzino > > > > -- > > > > ing. Lorenzo Margola > > > > it2b s.r.l. > > > > > > > > > > > > "Dustin van de Sande" wrote: > > > > > > > > > Lorenzino, > > > > > > > > > > Please post a bit of your code so we can review your code. > > > > > I use tables in a formview to manage the layout and it works fine with me. > > > > > > > > > > "Lorenzino" wrote: > > > > > > > > > > > Hi, I have a problem with bindings in a formview. > > > > > > I have a formview; in the insert template i've created a wizard control and > > > > > > inside > > > > > > it i have an HTML table with some textboxes bound to the sqldatasource of > > > > > > the > > > > > > formview. > > > > > > If i put this textboxes outside the table everything works well, but as soon > > > > > > as i put them inside the table (in order to organize the layout in the right > > > > > > way) > > > > > > they doesn't work. They works only as eval() and not bind() and so when i > > > > > > perform the saveclick i have only null values. I think this is a bug of > > > > > > visualstudio2005 because when i drag those textboxes outside the table thy > > > > > > are again bound to the sqldatasource and the save method works in the right > > > > > > way and i have no more null values. > > > > > > I've found the same problem also with a simple formview with a panel and a > > > > > > table in the insert or edit template. > > > > > > > > > > > > Please help me because i don't know how to proceed! > > > > > > > > > > > > Best Regards > > > > > > -- > > > > > > ing. Lorenzo Margola > > > > > > it2b s.r.l. =?Utf-8?B?TG9yZW56aW5v?= |
|
|
|
#8 |
|
Posts: n/a
|
Hi Lorenzino,
I validated the existince of the bug in VS 2005, but I don't know Microsoft get's a call of this. Maybe it's wise to report it again. Good luck. "Lorenzino" wrote: > In the link you sent me i read it would be fixed in the final release... i'm > using the last version of VS but the is still there with the wizard control > > Do I have to report the bug? > > Thanks for your help > > Lore > > -- > ing. Lorenzo Margola > it2b s.r.l. > > > "Dustin van de Sande [MCAD]" wrote: > > > You are right. It doesn't work. > > http://lab.msdn.microsoft.com/produc...3-21dfc795671b > > > > I'm afraid you will have to create this yourself, by creating a wizard and > > in the final_button_click fill all the fields in the previous steps into a > > record and insert it into the DB. > > > > "Lorenzino" wrote: > > > > > Hi Dustin, > > > probably i was not clear in my description: the problem is to insert a > > > Wizard in a FormView not the FormView in the WizardStep > > > > > > lorenzo > > > -- > > > ing. Lorenzo Margola > > > it2b s.r.l. > > > > > > > > > "Dustin van de Sande" wrote: > > > > > > > Lorenzino, > > > > > > > > Your welcome. I tried to reproduce the problem you describe, but I can't. It > > > > still works: > > > > > > > > <asp:Wizard ID="Wizard1" runat="server" Width="237px"> > > > > <WizardSteps> > > > > <asp:WizardStep runat="server" Title="Step 1"> > > > > <asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" > > > > DataSourceID="SqlDataSource1" > > > > OnModeChanged="FormView1_ModeChanged" > > > > OnPreRender="FormView1_PreRender"> > > > > <EditItemTemplate> > > > > <table> > > > > <tr> > > > > <td style="width: 100px"> > > > > ProductName: > > > > </td> > > > > <td style="width: 100px"> > > > > <asp:TextBox ID="ProductNameTextBox" runat="server" > > > > Text='<%# Bind("ProductName") %>'> > > > > </asp:TextBox></td> > > > > etc. > > > > > > > > Is this piece of code above simular to what you describe, of do I > > > > misunderstand? Maybe you can still post a part of your aspx like the code > > > > above to further explain your situation? > > > > > > > > "Lorenzino" wrote: > > > > > > > > > Hi Dustin, > > > > > thanks for your interest! > > > > > Posting you some code it's quite difficult because the FormView is inserted > > > > > in a complex module in a ASPNET-pages-portal-framework and will not work > > > > > standalone. I can explain you an easy way to simulate the problem: > > > > > create a FormView in a common ASP.NET page that has a simple SqlDataSource > > > > > mapped on a simple DB table (with Insert/Update/Delete capabilities). Then > > > > > insert a Wizard ASP.NET control and put some autogenerated TextBox of the > > > > > FormView Edit template field in it (i.e. 2 textbox on each wizard step). If > > > > > you try now your solution it'll work fine (in Edit you can use the wizard to > > > > > collect user input). Then put an HTML table in one wizard step to organize > > > > > the layout of the wizard step (i.e. a 2 columns table: 1° column label of the > > > > > field, 2° column textbox to collect the user entry). If now you restart your > > > > > solution you'll notice that the formview stops to work in the right way (it's > > > > > unable to bind the textbox with the parameter of the SqlDataSource) > > > > > Thanks > > > > > > > > > > Lorenzino > > > > > -- > > > > > ing. Lorenzo Margola > > > > > it2b s.r.l. > > > > > > > > > > > > > > > "Dustin van de Sande" wrote: > > > > > > > > > > > Lorenzino, > > > > > > > > > > > > Please post a bit of your code so we can review your code. > > > > > > I use tables in a formview to manage the layout and it works fine with me. > > > > > > > > > > > > "Lorenzino" wrote: > > > > > > > > > > > > > Hi, I have a problem with bindings in a formview. > > > > > > > I have a formview; in the insert template i've created a wizard control and > > > > > > > inside > > > > > > > it i have an HTML table with some textboxes bound to the sqldatasource of > > > > > > > the > > > > > > > formview. > > > > > > > If i put this textboxes outside the table everything works well, but as soon > > > > > > > as i put them inside the table (in order to organize the layout in the right > > > > > > > way) > > > > > > > they doesn't work. They works only as eval() and not bind() and so when i > > > > > > > perform the saveclick i have only null values. I think this is a bug of > > > > > > > visualstudio2005 because when i drag those textboxes outside the table thy > > > > > > > are again bound to the sqldatasource and the save method works in the right > > > > > > > way and i have no more null values. > > > > > > > I've found the same problem also with a simple formview with a panel and a > > > > > > > table in the insert or edit template. > > > > > > > > > > > > > > Please help me because i don't know how to proceed! > > > > > > > > > > > > > > Best Regards > > > > > > > -- > > > > > > > ing. Lorenzo Margola > > > > > > > it2b s.r.l. =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZSBbTUNBRF0=?= |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Store HTML table Values into Database | subscribeid | Software | 0 | 09-05-2008 02:39 PM |
| MCITP and stored procedure permissions | Darrilgibson@gmail.com | MCITP | 5 | 06-07-2008 12:37 PM |
| Re: storage problem | MF | A+ Certification | 1 | 06-04-2005 07:26 PM |
| Re: Virus Problem ** Help!** | David BlandIII | A+ Certification | 1 | 03-02-2004 06:00 PM |
| Re: Serious Computer Problem | hootnholler | A+ Certification | 1 | 11-24-2003 12:18 PM |