Browsing articles in "C#"
Nov
26
2008

Using fieldcontrols in a ListView

When you want to use a fieldcontrol like a Text, Link or Image control in a ListView you need to specify a datasource. By not specifying a datasource Sitecore looks at the current item. Which in a ListView is not the right one. So you need so set the datasource in code-behind or use an Eval expression in code-before. When you want you use the code-behind option you need to raise an eventhandler which triggers [...]

Apr
21
2008
.Net // C# // linq

Dynamic load where parameters for linqDatasource

When using an Linq Datasource (linq to sql) for a datagrid (Gridview, ListView, etc) you don’t always want all rows from a table. To exclute data you can use the WhereParameters to add an where statement to your DataSource. You can do limited where statements with the Visual Studio Wizards. When you need more than a limited statement you can dynamicly create an Parameter to add to your Linq DataSource. The following examples shows how to filter the Linq Datasource [...]