Here I'm using a DetailView to update or insert into a SQLDataSource. However, the control parameters are not found for my dropdownlist. The error message is: Could not find control 'ddlColor' in ControlParameter 'ColorID'. Here's an example of my UpdateParamenters.
<updateparameters>
<asp:controlparameter defaultvalue="0" type="Int16" propertyname="SelectedValue" controlid="ddlColor" name="ColorID">
</updateparameters>
SOLUTION
Since the page cannot find the control, you have to specify that the control is inside the DetailsView. Use DetailsView1$ddlColor for the ControlID. Here's the correct syntax.
<updateparameters>
<asp:controlparameter defaultvalue="0" type="Int16" propertyname="SelectedValue" controlid="DetailsView1$ddlColor" name="ColorID">
</updateparameters>
Sunday, July 20, 2008
Wednesday, July 16, 2008
What is .NET Now What?
Welcome to .NET Now What?! This is a collection of hard to find solutions for unexpected and unexplainable errors you might get during programming with Visual Studio. I mainly program in VB.NET using ASP.NET and ADO.NET with Microsoft SQL Server on the back end.
I've been programming for 12 years. I started with Perl in a linux environment. I've written my own shopping cart completely in perl using a mysql database. You can see it in action here:
http://www.thematguys.com
I moved on to VB.NET in 2004 and have contributed to many websites since then. I have also written windows applications, windows services and most recently my first smartphone application.
If you are a fellow programmer and find yourself stuck along the way, I hope you find some of my postings helpful.
I've been programming for 12 years. I started with Perl in a linux environment. I've written my own shopping cart completely in perl using a mysql database. You can see it in action here:
http://www.thematguys.com
I moved on to VB.NET in 2004 and have contributed to many websites since then. I have also written windows applications, windows services and most recently my first smartphone application.
If you are a fellow programmer and find yourself stuck along the way, I hope you find some of my postings helpful.
Subscribe to:
Posts (Atom)