473,657 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ 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 3498
On 18 Nov, 16:36, "M. Ali Qureshi" <m.ali.qure...@ hotmail.comwrot e:
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*********@ne wsgroup.nospamw rote in message
news:e2******** ******@TK2MSFTN GP04.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
3032
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 selects it (a tab?) Thank you.
0
1801
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 multiview is declared below the dropdown controls on another portion of the page. so, here is the progression.. 1) select a category from drowdown one that is bound using sqldatasource1 2) dropdown2 is populated based on selection or...
0
3410
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 MultiViev, at first it working, when I click btn1 I set SetActiveView to viev1 and it's working OK, but when after that I click btn2 and try to set SetActiveView to 2, I receive this error:
4
3271
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
2665
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 causes a postback. When the click event gets handled I am grabbing the MultiView instance from a parent control (using a recusive method). When i change the active View on this MultiView control nothing happens. The second time you click the button...
0
2396
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 View I want the form populated from there profile on the sql server. The code to save the profile works fine. But when the user logs back in they data doesn't load back to the form. The multiview is located inside the LoginView's Logged-In View ....
1
4111
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 same error (with 'Label' replaced with another control type) when I use other control types as well. The only type of control that is an immediate child of my MultiView control is View. The basic layout of my MultiView control is:
0
1557
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 here. Basically I'm using the Multiview as a kind of wizard with back/next buttons. At step one, I ask a question... let's say "How old are you?"... and I use the response to this question to determine the contents of the controls on subsequent...
0
1147
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 in each of the tabs form. In my first tab the validation summary control works, where as in the second tab it dosent shows up. Help me out please
0
8411
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.