If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. I have the following code that is throwing this error but the solutions I've found say, "Have you tried the DataSourceID instead of DataSource?" with no indication as to what should I changed one method signature and broke 25,000 other classes. Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Your Email This email is in use. We will test the project on our side and do our best to find the source of the problem.In addition, I should note that if you specify the TextField property, you Does The Amazing Lightspeed Horse work, RAW? What is the definition of "rare language"?
See Trademarks or appropriate markings. n-dimensional circles! Do you need your password? What now?
walterhevedeich 29-Mar-11 6:04am Are you using master page/user control(ascx) for this one? Solution 2 Accept Solution Reject Solution I think this might help. It takes just 2 minutes to sign up (and it's free!). click here now IIRC I think you don't have to do that, if you want to have a databound control within a databound control - e.g.
How to NOT render a part of a document What is really curved, spacetime, or simply the coordinate lines? Protected Sub LinqDataSource1_Selecting(sender As Object, e As LinqDataSourceSelectEventArgs) Handles LinqDataSource1.Selecting Dim db As New TestDataContext Dim tickerquery As New StringBuilder tickerquery.Append("DECLARE @ALL_Total int ") tickerquery.Append("DECLARE @ABC_Total int ") ASP.Net Sitemap Creator Reply ecbruck All-Star 88260 Points 9668 Posts Re: The 'DataSource' property cannot be set declaratively Aug 24, 2007 12:49 PM|ecbruck|LINK Use the property 'DataSourceID' instead od 'DataSource'. DataSource will bind your list to an IEnumerable, IListSource etc.
For larger applications it is not advisable to use this technique, because you have no separation between your user interface and your business or data access code.
Yes, my password is: Forgot your password? I now have a problem with the SQL statement which I know works on its own but when used with LINQ I get a Syntax error 'SELECT SELECT SELECT' As this You can use the Page.DataBind or the Control.DataBind method to bind the data to the data sources. tomtimmers 29-Mar-11 9:07am Is it possible to set the SelectedValue to a value from the list?
Now the default selected value is the first value from the list provided by the datasource. It's quick & easy. Cancel The title field is required!
Thanks. =?Utf-8?B?RGFiYmxlcg==?=, Apr 3, 2006 #1 Advertisements Flinky Wisty Pomm Guest Does it work with DataSourceId? datasource cannot be set declaratively P: n/a Dabbler I have a dropdown list in an item template of a gridveiw. But in your case it not so (you haven't outer container). I should have used <%# Eval("Fieldname")%> and not <%= All works...
But your question was about the DataSourceId and not about how to bind a DropDownList. Please modify my project to reproduce the issue and provide us with it. Not the answer you're looking for? Attached is the project.Some different conditions seem to be affecting this behavior in your project.
I modified the DDL as follows: