-
Repeater question
Dear all,
There are three columns in my dataview, "code", "amount_1" and "amount_2". Now I am using a Repeater to display the data in the dataview and what I need to do is when the paramters "ind" = 0, display "amount_1", otherwise display "amount_2", and my code is:
......
<ItemTemplate>
<%
If Request.QueryString("ind") = "0" then
Response.Write(DataBinder.Eval(Container.DataItem,"amount_1")
Else
Response.Write(DataBinder.Eval(Container.DataItem,"amount_2")
End If
%>
</ItemTemplate>
........
But I got an error "BC30451 'Container' not declare....", anyone know whats wrong in my code since I'm new in ASP .NET
Regards,
Calvin
-
Repeater
if u use DataGrid control u can easily make changes what u want.
1 . In code behind use Data Table to dynamicaly add columns and merge it to new Dataset.
2. Bind that Dataset to Datagrid or Bind Datatable Default view to Datagrid.
-
1 Attachment(s)
Have you ever looked at XSLT sheets?
Now I am not that good at ASP.NET, but have a reasonable grasp on it, and from what I have seen XSLT sheets are much easier to use.
You can even have a reference to a VB class in the XSLT sheet, which allows you to run VB functions.
Attched is a small demo.
You need to create a DB with a Users table and the following fields:
- ID
- Username
- Password
- RegisteredDate
Datatypes should be pretty much self explanatory from the field names.
Woka