|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Menu Control and Page ValidationIs there a simple way in which I can get the Menu control to cause page
validation to happen on the client side - thus causing client side validator components to execute before a postback is attempted? Reason: I have a web app that will always be accessed by the client group from IE therefore I can fully take advantage of client side validation. To simplify the UI I have created a tabbed dialog and have used the menu control to manage the tabs. I'd like the client side validation to fire if the user attempts to switch tabs whilst there is invalid data on the current tab. I can achieve the desired Tabbed effect using panels and linkbuttons but its not a neat as the menu control. Thanks Hi Ken,
maybe you should reconsider the behavior. The users might just close the browser, reopen it and then go to the tab they are after. But if you really do want this behavior, it will be difficult to add validation logic, the Menu doesn't support this by default. I am also doubtfull it will work using the extensibility model of the Menu control. Grtz, Wouter van Vugt Trainer - Info Support blogs.infosupport.com/wouterv You may be able to take advantage of the MenuItem.NavigateUrl property. (I
use this to attach my validation system, Professional Validation And More, into the ASP.NET 2.0 menu control to achieve the same goal.) MenuItem1.NavigateUrl = "javascript: if (Page_ClientValidate('validation group name')) document.location.href='new url';" --- Peter Blum www.PeterBlum.com Email: PLB***@PeterBlum.com Creator of "Professional Validation And More" at http://www.peterblum.com/vam/home.aspx Show quoteHide quote "Ken McBryde" <KenMcBr***@discussions.microsoft.com> wrote in message news:B4356DEA-7AB0-4C3F-8223-B2AE46ADF370@microsoft.com... > Is there a simple way in which I can get the Menu control to cause page > validation to happen on the client side - thus causing client side > validator > components to execute before a postback is attempted? > > Reason: > I have a web app that will always be accessed by the client group from IE > therefore I can fully take advantage of client side validation. To > simplify > the UI I have created a tabbed dialog and have used the menu control to > manage the tabs. I'd like the client side validation to fire if the user > attempts to switch tabs whilst there is invalid data on the current tab. > > I can achieve the desired Tabbed effect using panels and linkbuttons but > its > not a neat as the menu control. > > Thanks
Inheriting from the TreeNode class
CreateChildControls() always returns default property values GridView "visible=False" data items not accessible? programattically Enabling/diusabling child controls Input fields are renamed with runat="server", how do I change it Website on a website. Set visibility of label in itemtemplate of repeater control Dependent GridViews And CommandArguments VS 2005 Validator controls Reading a public variable from a web user control |
|||||||||||||||||||||||