Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: How to access Datalist item through vb script on client side??


Message #1 by "Yu, Kevin" <kyu@N...> on Thu, 18 Oct 2001 18:03:31 -0400
i am using client side input validation and use vb script to validate the

textbox input,

one I validate the input, I want to sum all items to get a total, that means

I need to

go through the datalist and do the sum. 





the ItemTemplate  looks something like this:



<ItemTemplate>			

			<tr style="background-color:FFECD8">

			<td width = "20%" valign=top><b><asp:label

id="Projid" text='<%# DataBinder.Eval(Container.DataItem, "projid")%>'

runat="server"/></td>

			<td width = "70%"><%#

DataBinder.Eval(Container.DataItem, "title") %></td>

			<td width = "1%"><asp:textbox id ="WorkHours" text 

"0.0" width=40px maxlength=5 runat="server"/>

			</td>

			<td width = "10%"><asp:label id ="Unit" text 

"Hours" runat="server"/></td>

			<td width = 0><asp:CustomValidator id="ValidateTime"

runat="server"

        	ControlToValidate="WorkHours"

			ErrorMessage="Invalid."

        	clientvalidationfunction="ClientValidate"

        	display="Static"

        	ont-Name="verdana" Font-Size="10pt"></asp:CustomValidator>

			</td>

			</tr>

</ItemTemplate>



the clientvaidate function is Clienvalidate(source, arguments), but the

argument passed is for the Textbox "workhours", but I want to 

be able to traverse the list, how can I do that?







Kevin Yu

system.data.oledb

coop student

Western Research Center - Natural Resource Canada

email: kyu@n...

phone:(780) 

  Return to Index