Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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
  #1 (permalink)  
Old December 31st, 2013, 07:37 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Validation inside Detailsview

Hi,

First i would like to say that i really enjoyed reading beginning asp.net 4.5 in c# and VB.

My question is wheenever i put validation controls in the insertitemtemplate OR edititemtemplate fields for validation inside the detailsView,neither validation happen nor postback.In this case when i hover my mouse over insert link then it say something postbackwithoption but clicking on link nothing happen

And if i remove validation controls post back happen.In this case when i hover my mouse over insert link then it say something postback.

Even if i open chapter 13 from visual studio 2012 by file -> Open website ->chapter13
and open addEditReview.aspx and view in browser and click on insert ,validation does not occur.

I spent a lot of time on google found following solution but nothing worked for me
1.Setting cause vlidation to false for insert link
2.Setting Groupvalidation for controls and insert link
  #2 (permalink)  
Old January 2nd, 2014, 09:34 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

If no postback occurs, then maybe the validation controls are working after all? Maybe you forgot to set the Text or ErrorMessage properties? Does the form submit correctly when you fill in all required fields?

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!
  #3 (permalink)  
Old January 3rd, 2014, 09:17 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for your reply.

I did set the error message and text property properly.

And even if i fill in the required fields the post back does not occurs.

For finding the solution , I created a new test web application (Not empty) instead of new website and after attaching the data base.I created just the AddEditReview.aspx and view in browser then everything is working perfectly.

so is it due to creating empty website in visual studio 2012 or something.

Please suggest me something because i want to read your book completely as it is so good.But this matter is not allowing me to go further

Thanks
  #4 (permalink)  
Old January 4th, 2014, 08:31 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you set up a script reference for jQuery and set the validation mode in the web.config file to WebForms as explained earlier in the book? Can you post the markup and code behind of this page as well as your web.config file?

If you post code, can you please paste it in Notepad first to remove color coding and then use the forum editor's Code toolbar button to wrap your code in code tags. Otherwise, this forum messes up the code.

Cheers,

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!
The Following User Says Thank You to Imar For This Useful Post:
_Ali (January 13th, 2014)
  #5 (permalink)  
Old January 13th, 2014, 07:43 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

After verifying the steps you suggested and removing the silly mistakes i made especially setting my system's time to correct, my problem is solved.

Thanks for all your help.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Controls not working in DetailsView malie22001 BOOK: Beginning ASP.NET 4 : in C# and VB 4 March 21st, 2012 11:37 PM
Accessing and using an ActiveX from inside a HTML page hosted inside a WebBrowser con adyrotaru C# 2005 2 June 25th, 2009 04:21 PM
Standalone validation + web form validation morbo Struts 0 August 19th, 2008 04:02 AM
Events for Control Inside DetailsView AspNetGuy ASP.NET 3.5 Basics 3 June 6th, 2008 02:09 PM
Problem with validation inside user control aldwinenriquez ASP.NET 1.0 and 1.1 Professional 3 July 1st, 2007 09:53 AM





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