Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 November 20th, 2013, 06:34 PM
Registered User
 
Join Date: Nov 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hello, receive warning when adding to templates on FormView??

I am receiving a warning whenever I attempt to add a Label Control and a DropDownList to a FormView. I have added both the Label Control and the DropDownControl to all the templates (Edit, Insert, Item) and have the controls linked to a SqlDataSource. When I'm done configuring the FormView's custom SQL statement, it ask me the following:

Would you like to regenerate the FormView templates and datakeys using the selected data source schema? Warning: this will delete the existing templates"??

I do not have a development server, only a production server, so I'm really hestitant to click "yes", as I'm unsure what that will exactly do to my other pre-existing controls on the templates. I have looked online for more information regarding what this action will exactly do to my templates (Edit, Item, Insert), however I've had little luck.

I'm very new to web site development as you can probably tell.

Any help or comments would be greatly appreciated.

Amanda
 
Old November 20th, 2013, 09:06 PM
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,

The various templates in the FormView are based on the columns you are selecting in the SqlDataSource. If you make changes to that data source, VS isn't sure if the templates still match the code, and thus offers to regenerate.

If you're only adding a new column, you can click No, and manually modify the templates.

I would recommend clicking Yes at least once as well, just to see what changes. Changes are not saved automatically, and you can always click Undo.

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
Adding a Panel control in FormView steve35719 ASP.NET 2.0 Basics 5 August 18th, 2010 12:32 AM
Ch. 4 - Adding FormView control problem donesquire BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 2 August 6th, 2010 03:56 AM
Customize autogenerated FormView templates? SpaceWokker ASP.NET 2.0 Basics 2 March 12th, 2007 11:19 AM
Validation controls and FormView templates bpdsmark BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 September 28th, 2006 08:56 AM
Autogenerate Formview templates wirerider ASP.NET 2.0 Basics 3 August 1st, 2006 06:55 PM





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