Last post Oct 21, 2015 03:19 PM by Rion Williams
Oct 21, 2015 11:36 AM|zassadgh|LINK
Hello, I have trouble passing an ArrayList through inline asp.net, what am I doing wrong here:
<uc1:MultiFileUploadWithDescAndCat ID="MultiFileUploadWithDescAndCat1" HideMoveCSS="true" FileCategoryDataSource='<%# DataClasses.DefaultFileCategoryItems2()%>' FileCategoryDataValueField="Index" FileCategoryDataTextField="CategoryName" runat="server" />
The problem is the FileCategoryDataSource, what is wrong with doing it the way I just wrote, the problem is simple, the ArrayList is not passed (the problems is not the Public Properties, they work well, it is the inline code passing the ArrayList?
Oct 21, 2015 12:20 PM|Rion Williams|LINK
You would probably want to actually set this property in your code-behind as opposed to attempting to set it in this manner :
MultiFileUploadWithDescAndCat1.FileCategoryDataSource = DataClasses.Default.FileCategoryItems2();
DataSource will generally be pointing to an actual "data-source" control by it's name when used in an inline manner.
Oct 21, 2015 03:08 PM|zassadgh|LINK
So it is not possible to pass it through inline? what you suggested works fine, but is it possible to pass it through inline instead of code-behind?
Oct 21, 2015 03:19 PM|Rion Williams|LINK
So it is not possible to pass it through inline?
The DataSource property is generally going to want to point to the ID of a specific data source control (similar to how a SqlDataSource might be bound) as opposed to raw data itself :