Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #2 (permalink)  
Old January 2nd, 2014, 09:34 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
  #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
Reply With Quote
  #4 (permalink)  
Old January 4th, 2014, 08:31 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.