Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

binding a collection to repeater control

Status
Not open for further replies.

newtoASP

Programmer
Jun 1, 2001
40
US
I am trying to bind the result of a calender conrtrol week selection to a repeater conrtol. What do I need to put into the <item template> of the repeater to display the individual dates returned?
 
DataBinder.Eval(Container.DataItem,&quot;thePropertyName&quot;)
penny1.gif
penny1.gif
 
Thanks link9. How can I format the collection of dates to display the date differently (without the time, for example)?
 
<%# formatDate(DataBinder.Eval(Container.DataItem,&quot;thePropertyName&quot;)) %>

~~~~~

public function formatDate(o as object) as string
'format o and return it as your desired format
end function
penny1.gif
penny1.gif
 
Ok, I can display the dates in a repeater or datalist, but for each row (each date), I need to add text boxes based on the rows of another table.

date1 textbox1(row1 of tblTypes) ... TextBoxn(rowN of tblTypes) LinkButton1
I have to be able to use the date and the textbox values in an insert or update query.
I have tried to add a repeater or datalist to the itemtemplate without success, when databind gets called for the nested conrol, I get system.nullreferenceexeption.
Is there a way to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top