andieje
asked on
how to reuse a custom validator across multiple pages
Hi
I have created a custom validator and I would like to be able to easily reuse this across pages without cutting and pasting my code. How would i do this? Here is my validator...
<asp:CustomValidator id="valCheckDelivery" runat="server" ValidationGroup="MakeReque st" Display="Dynamic" EnableClientScript="False" OnServerValidate="valCheck Delivery_S erverValid ate">You have not supplied your address with your account information. Please edit your details.</asp:CustomValida tor>
Protected Sub valCheckDelivery_ServerVal idate(ByVa l source As Object, ByVal args As System.Web.UI.WebControls. ServerVali dateEventA rgs)
args.IsValid = MyUser.UserRegisteredAddre ss(GetIDOf LoggedInUs er())
End Sub
thanks a lot
andrea
I have created a custom validator and I would like to be able to easily reuse this across pages without cutting and pasting my code. How would i do this? Here is my validator...
<asp:CustomValidator id="valCheckDelivery" runat="server" ValidationGroup="MakeReque
Protected Sub valCheckDelivery_ServerVal
args.IsValid = MyUser.UserRegisteredAddre
End Sub
thanks a lot
andrea
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.