Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Darla Morrison   on Nov 29 In Asp.net Category.

  
Question Answered By: Allan Bailey   on Nov 29

I have a class in another project called Order.ErrorDescription which
is an arraylist. eStr returns a set of errors i.e. if a user entered
the email address wrong then a message is displayed, if the telephone
number entered is in the wrong format then a different error message
appears. However, i would like to display  that information  in a neat
and presentable format on my webform and that is why i thought of
using a repeater. Can someone please help  me with the right format?
Currently it only returns the email error even if there are other
errors.


aspx.vb
Order.ValidateValues = False

Dim errStr As String


If Not Order.Validate() Then

For Each eStr As String In Order.ErrorDescription

errStr = (eStr & "<BR>")
Repeater1.DataSource = (errStr)

Repeater1.DataBind()
Next
End If


aspx:
<TR>
<TD><asp:repeater id="Repeater1" runat="server">
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>
</asp:repeater>
</TD>
</TR>

Share: