Link to home
Start Free TrialLog in
Avatar of Member_2_7967119
Member_2_7967119

asked on

How to control validation in User Controls when they are added to the same web form?

I have a webpage written in html 5 using bootstrap. As part of my requirement, we use the tab format using the div tags. and I place each of the web controls in each div tag which is accessible when the user click on the web tabs.

Now I have submit button for each of the web controls forms but it is not firing the post event since it is checking the validation of all the web controls forms at the same time.

How can I avoid this and have the validation be specific to that web user control only. I am using microsoft framework 4.5 and visual studios 2013
Avatar of Mukesh Yadav
Mukesh Yadav
Flag of India image

Can you please share the code snippet you are using so that we can have a look at it and help you quickly?
Avatar of Member_2_7967119
Member_2_7967119

ASKER

Attached is the web user control. As you would see we are using and linking other users controls.  To check please do the following.

In the second web user control have a textbox validation control to ensure the users needs to enter some data.
On the first web user control you can have a submit button and when you click on the submit, nothing happens as the validation message of the second web user control is being invoked. When u navigate to the second tab, you will see the validation message.
controls.txt
Any update Sir?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.