Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2011, 01:44 PM
Authorized User
 
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reg. Contact Form ?

Hi
I have created the feedback form as mentioned in book the only modifiaction i would like to do is I would like to add Subject using drop down list.
The options is as follows.
1) Please select your subject.
2)complain
3)Request
4)Feedback
5)General Enquiry.

I would like to put validation that when some one do not select anything and he/she leave the subject as Please select your subject as it is. He get an alert Please Select The subject. Rest Contact Form is as it is as you designed in book. Kindly reply me.
 
Old October 16th, 2011, 08:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can add a DropDownList to the page with the options you mentioned. Then assign an empty string ("") to the value of the first item. Next, hook up a RequiredFieldValidator to the DropDownList to force the user to make a selection. Chapter 9 shows how this works.

You can then use the SelectedValue property of the DropDownList to assign the subject.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Contact form From Chapter 9 susu2009 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 November 20th, 2009 08:49 AM
I need help with contact form iorgusu Need help with your homework? 1 September 27th, 2009 01:56 AM
Contact form? philthy BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 1 July 23rd, 2009 05:14 PM
contact form Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 February 24th, 2009 01:42 PM
Contact Form myself Classic ASP Basics 1 November 18th, 2006 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.