473,466 Members | 1,336 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multiview and field validation

Hi,

Another question from a newbie....

Scenario:
- I have a multiview on page "MultiView1". This contains 2 views inside it
(ViewList and ViewInsert).
- ViewList shows data in a grid control.
- ViewInsert have a few textfields with validation controls attached. These
fields will insert data in the table.
- There are 2 buttons (placed outside the multiview) which should toggle
between 2 views (Button1 and Button2)
- PageLoad sets the ActiveView to "ViewList"

Problem:
When i click on button2, it toggles the view and shows ViewInsert
When i click button1, which should toggle again to show ViewList, the field
validators give error that the required fields are not filled.
I understand that this is working as it should as the button posts back the
page.
My question is that how can i toggle between views without validating the
fields?

Thanks for help.

/MAQ

Nov 18 '07 #1
3 3485
On 18 Nov, 16:36, "M. Ali Qureshi" <m.ali.qure...@hotmail.comwrote:
Hi,

Another question from a newbie....

Scenario:
- I have a multiview on page "MultiView1". This contains 2 views inside it
(ViewList and ViewInsert).
- ViewList shows data in a grid control.
- ViewInsert have a few textfields with validation controls attached. These
fields will insert data in the table.
- There are 2 buttons (placed outside the multiview) which should toggle
between 2 views (Button1 and Button2)
- PageLoad sets the ActiveView to "ViewList"

Problem:
When i click on button2, it toggles the view and shows ViewInsert
When i click button1, which should toggle again to show ViewList, the field
validators give error that the required fields are not filled.
I understand that this is working as it should as the button posts back the
page.
My question is that how can i toggle between views without validating the
fields?

Thanks for help.

/MAQ
The answer is you can't have it both ways - sorry!

Actually it's not too bad. It just means you can't use client-side
validation. You'll have to do it on the server using your own code.
Normally it's done to improve performance by avoiding round trips. If,
however, client-side validation is paramaount then you'll have to
present the user with a view that does not allow any other course of
action until they enter valid data or exit via a cancel option.
Nov 18 '07 #2
Take a look at Validation Groups - I think it might be your answer

Nov 18 '07 #3
Thanks alot buddy.

Validation Groups solved the problem :-)

"Michael Tissington" <mt*********@newsgroup.nospamwrote in message
news:e2**************@TK2MSFTNGP04.phx.gbl...
Take a look at Validation Groups - I think it might be your answer
Nov 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: needin4mation | last post by:
I wanted easy tabs for my webpage and saw the new MultiView. I read and couldn't tell, but is the MultiView the same as having tabs? Or does MultiView bring everything at once and the user just...
0
by: Fabuloussites | last post by:
I have a page that has multiview control that has two dropdown lists on it. the dropdown controls ARE NOT inside of the multiview. Each drop down is bound using its own sqldatasource conrtol. The...
0
by: Avon | last post by:
Hi friends, I am very sorry for my not perfect English. I have one question, I am using David Bauer's DynamicControlsPlaceholder to dinamically generate controls and I am tryig to generate...
4
by: TMT32 | last post by:
Hi, I try to add multiview in datalist, but how to change multiview's default view page in datalist? Where it is ? datalist1.itemtemplates.itemtemplates.multiview ?? thanks TMT32
2
by: Alexander van Doormalen | last post by:
I have a MultiView control with 2 Views in it. In the first View I have a form which contains sereral input controls and a custom UserControl. In this custom UserControl I have a button which...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
1
by: Nathan Sokalski | last post by:
When I include a MultiView control in my application, I receive the following error: MultiView cannot have children of type 'Label'. It can only have children of type View. I receive the...
0
by: James Crosswell | last post by:
I noticed something interesting when using the Multiview control and was wondering if someone could shed some light on the inner workings of all of this so I can better understand what's going on...
0
by: =?Utf-8?B?aUhhdkFRdWVzdGlvbg==?= | last post by:
I am using a tabs in my application and with the help of multiview control i have created different tabs. In each tab form there is a registration form. I need to add a validation summary control...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.