Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to write a custom validation function in a seaprate class (C#) like Functions.cs, where the function can be called to validate the following from

How to write a custom validation function in a seaprate class (C#) like Functions.cs, where the function can be called to validate the following from the Code-Behind such as Validate()...... Can not use Validator.

In my aspx page, I need to validate these input:

image text in transcribed

-The name, address, and phone number textboxes cannot be blank.

-The user must select an option to either pickup their order or have it delivered.

-The user must select at least one pizza before completing the order. This means they need to add a checkmark to at least one row in the GridView for a PizzaType.

-A quantity must be entered for every PizzaType that is checkmarked in the GridView.

div> casp: Label ID "1b1Name" runat "server" Text "Name: "> casp:TextBox IDa "txtName" runat "server" >x/asp: Textbox> Kasp: Label ID-"1blAddress" runat-"server" Text-"Address: "x/asp: Label> asp : Label ID="1b1PhoneNumber" runat-"server" Text-"Phone #: ">Label) asp :TextBox ID="txtPhoneNumber" runate" server" >: TextBox> /asp:Label> Kasp:RadioButtonList ID-"rdblMethod" runat-"server"> asp:TemplateField HeaderText "Select Pizza Type"> asp:CheckBox ID:"chkSelect" runat="server" /> plateField> casp: BoundField DataFielda "PizzaType" HeaderTexts "Pizza Type">/asp:BoundField> Small Medium plateField> asp :TemplateField HeaderText-"Quantity"> casp:TextBox IDa"txtQuantity" runat"server"x/asp:TextBox> plateField>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions