Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
ASP.NET 2.0 / 3.5 / 4.0
Ipossibile trovare il controllo 'ddlDepartment01' in ControlParameter ...
venerdì 25 luglio 2008 - 18.26
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
cicciuzzo
Profilo
| Junior Member
106
messaggi | Data Invio:
ven 25 lug 2008 - 18:26
ciao a tutti
ottengo quest'errore con quest'istruzione :
protected void ldsCategoryList_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
if (fvProducts.DefaultMode == FormViewMode.Insert)
{
DropDownList DepID = (DropDownList)fvProducts.FindControl("ddlDepartment01");
e.SelectParameters["DepartmentID"] = DepID.SelectedValue;
}
}
Impossibile trovare il controllo 'ddlDepartment01' in ControlParameter 'DepartmentID'.
e sinceramente non capisco perche'????
Qualcuno mi puo aiutare?
ciao e grazie
paoval72
Profilo
| Senior Member
297
messaggi | Data Invio:
sab 26 lug 2008 - 12:15
Ciao, puoi postare la struttura del formview?
Paolo
cicciuzzo
Profilo
| Junior Member
106
messaggi | Data Invio:
lun 28 lug 2008 - 10:05
Questo è il codice della mia formview:
<asp:FormView ID="fvProducts" runat="server" AllowPaging="True"
DataKeyNames="ID" DataSourceID="ldsProduct" CellPadding="4"
ForeColor="#333333" Width="100%">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditItemTemplate>
ID:
<asp:Label ID="lblID" runat="server" Text='<%# Eval("ID") %>' />
<br />
Reparto Padre:<br />
<br />
<br />
CategoryID:<br />
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="ldsCategoryList" DataTextField="Name" DataValueField="ID"
SelectedValue='<%# Bind("CategoryID") %>'>
</asp:DropDownList>
<br />
<br />
ManufacturerID:<br />
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="ldsManufacturers" DataTextField="Name" DataValueField="ID"
SelectedValue='<%# Bind("ManufacturerID") %>'>
</asp:DropDownList>
<br />
<br />
Name:<br />
<asp:TextBox ID="tbNome" runat="server" Text='<%# Bind("Name") %>'
Width="300px" />
<br />
<br />
ID Interno:<br />
<asp:TextBox ID="tbIdInternal" runat="server" Text='<%# Bind("IDInternal") %>'
Width="300px"/>
<br />
<br />
<FTB:FreeTextBox ID="ftbDescription" Text='<%# Bind("Description") %>' runat="Server"
ButtonImagesLocation="ExternalFile" JavaScriptLocation="ExternalFile"
SupportFolder="~/FreeTextBox/" ToolbarImagesLocation="ExternalFile"
ButtonSet="OfficeXP" />
<br />
Immagine:<br />
<asp:FileUpload ID="fuImgProduct" runat="server" Width="600px" />
<br />
<br />
Keyword:<br />
<asp:TextBox ID="KeywordTextBox" runat="server" Text='<%# Bind("Keyword") %>'
Width="300px" />
<br />
<br />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
Reparto Padre:<br />
<asp:DropDownList ID="ddlDepartment01" runat="server" AutoPostBack="True"
DataSourceID="LinqDataSource1" DataTextField="Name" DataValueField="ID"
onselectedindexchanged="ddlDepartment01_SelectedIndexChanged">
</asp:DropDownList>
<br />
<br />
CategoryID:<br />
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ldsCategoryList"
DataTextField="Name" DataValueField="ID"
SelectedValue='<%# Bind("CategoryID") %>'>
</asp:DropDownList>
<br />
<br />
Produttore:<br />
<asp:DropDownList ID="DropDownList2" runat="server"
DataSourceID="ldsManufacturers" DataTextField="Name" DataValueField="ID"
SelectedValue='<%# Bind("ManufacturerID") %>'>
</asp:DropDownList>
<br />
<br />
Name:<br />
<asp:TextBox ID="tbNome" runat="server" Text='<%# Bind("Name") %>'
Width="300px" />
<br />
<br />
ID Interno:<br />
<asp:TextBox ID="tbIdInternal" runat="server" Text='<%# Bind("IDInternal") %>'
Width="300px"></asp:TextBox>
<br />
<br />
<FTB:FreeTextBox ID="ftbDescription" Text='<%# Bind("Description") %>' runat="Server"
ButtonImagesLocation="ExternalFile" JavaScriptLocation="ExternalFile"
SupportFolder="~/FreeTextBox/" ToolbarImagesLocation="ExternalFile"
ButtonSet="OfficeXP" />
<br />
<br />
Immagine:<br />
<asp:FileUpload ID="fuImgProduct" runat="server" Width="600px" />
<br />
<br />
Keyword:<br />
<asp:TextBox ID="KeywordTextBox" runat="server" Text='<%# Bind("Keyword") %>'
Width="300px" />
<br />
<br />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
ID:<br />
<asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
<br />
<br />
<br />
Categoria :
<asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="ldsCategory"
DataTextField="Name" DataValueField="ID" Enabled="False"
SelectedValue='<%# Bind("CategoryID") %>'>
</asp:DropDownList>
<br />
<br />
<br />
Produttore :
<asp:DropDownList ID="DropDownList4" runat="server"
DataSourceID="ldsManufacturers" DataTextField="Name" DataValueField="ID"
Enabled="False" SelectedValue='<%# Bind("ManufacturerID") %>'>
</asp:DropDownList>
<br />
<br />
Name:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
<br />
<br />
ID Interno :
<asp:Label ID="lblIdInternal" runat="server" Text='<%# Eval("IDInternal") %>'></asp:Label>
<br />
<br />
Descrizione :<br />
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Bind("Description") %>' />
<br />
<br />
<asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("ImageFile") %>' />
<br />
<br />
Keyword:
<asp:Label ID="KeywordLabel" runat="server" Text='<%# Bind("Keyword") %>' />
<br />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<EmptyDataTemplate>
<asp:Button ID="btnNewProduct" runat="server" onclick="btnNewProduct_Click"
Text="Nuovo prodotto" />
</EmptyDataTemplate>
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
</asp:FormView>
Ciao e grazie
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !