473,756 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button Doesn't Work on Panel with Validation Control

I have noticed that within my application my button controls do not
work when there are validation controls on the panel (even if the
validation controls are not visible, i.e. not showing an error with
the control they are validating). When I click the buttons they enter
the depressed state, but nothing happens.

Similar button controls work fine when on a page where their is no
validation. Also, I am only experiencing this issue on one out of
three web servers the application is on. I have checked and the
aspnet_client script directory is in the root directory of the
application.
Nov 18 '05 #1
4 1446
"Spence Hackney" <ws******@yahoo .com> wrote in message
news:25******** *************** ***@posting.goo gle.com...
I have noticed that within my application my button controls do not
work when there are validation controls on the panel (even if the
validation controls are not visible, i.e. not showing an error with
the control they are validating). When I click the buttons they enter
the depressed state, but nothing happens.

Similar button controls work fine when on a page where their is no
validation. Also, I am only experiencing this issue on one out of
three web servers the application is on. I have checked and the
aspnet_client script directory is in the root directory of the
application.


I've never noticed this. Could you post a small reproducer?
--
John Saunders
johnwsaundersii i at hotmail
Nov 18 '05 #2
I found something else odd. If I use an imagebutton or a button the
event does not fire. However, if I use a linkbutton control on the panel
it does! Go figure!

Does this bring up any ideas?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Found something interesting. On my local server (where the code works)
the form tag on the client side code after the ASPX page has been
processed is:

<form name="Form1" method="post"
action="GradApp lication.aspx?M ode=applicanted it&amp;Applicat ionID=313"
language="javas cript" onsubmit="Valid atorOnSubmit(); " id="Form1">

The page on the new server that does not work contains:

<form name="Form1" method="post"
action="GradApp lication.aspx?M ode=applicanted it&amp;Applicat ionID=1"
language="javas cript" onsubmit="if (!ValidatorOnSu bmit()) return false;"
id="Form1">

Also, the page that works says:

function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}

The one that doesn't reads:

function __doPostBack(ev entTarget, eventArgument) {
var theform;
if (window.navigat or.appName.toLo werCase().index Of("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENT TARGET.value = eventTarget.spl it("$").join(": ");
theform.__EVENT ARGUMENT.value = eventArgument;
theform.submit( );
}

(Notice the enclosing brackets arounsd Form1.)

What is going on to cause the same ASP.NET application to produce
different output on two different servers? I checked and they are both
using the latest .NET Runtime (1.1.4322.573).

Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
Eureka! I found that the problem was with the WebUIValidation .js file.

I changed the ValidatorCommon OnSubmit function to:

function ValidatorCommon OnSubmit() {
var result = !Page_BlockSubm it;
Page_BlockSubmi t = false;
event.returnVal ue = result;
return result;
}

See the follwing for information:

http://thomasfreudenberg.com/blog/ar...ntProblemSolve
d.aspx

http://groups.google.com/groups?hl=e...=e72nxxFOEHA.2
704%40TK2MSFTNG P10.phx.gbl&rnu m=1&prev=/groups%3Fq%3Dif %2B(!ValidatorO nS
ubmit())%2Bretu rn%2Bfalse%253B %26hl%3Den%26lr %3D%26ie%3DUTF-8%26selm%3De
72nxxFOEHA.2704 %2540TK2MSFTNGP 10.phx.gbl%26rn um%3D1

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

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

Similar topics

1
3909
by: Matt Howeson | last post by:
I am sure this question has been asked many times, however I am yet to find a satisfactory solution to the problem. I have a number of user controls within an asp.net page, a login box, a search box, and contact form. I wish to be able to ensure that when the user presses enter in the appropriate textbox control, the correct form is validated and submitted. I have tried a number of methods to achieve this goal, the main one being...
10
1320
by: Steve | last post by:
Hi- I had this nice little wizard application running. It was comprised of several Panel controls initially set w/ their visibility off except for the first one, then as you progress through the page, a code-behind method would manage the correct panel's visibility, giving the illusion of separate steps. Fine, great. All the panels has server button controls for "Next" and "Previous" The last panel has a button control (server of...
8
10798
by: simon | last post by:
On code behind file: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim ctrl As New LinkButton ctrl.ID = "link1" ctrl.Text = "link create" ctrl.CommandArgument = "myargument"
5
3199
by: dje | last post by:
In the OnClick event on a radioButtonList, I run a javascript to show/hide the appropriate div along with a submit button, which displays as expected. The problem is the submit no longer works on the button. If I quit using the divs, and do a postback on the radiobutton selection, showing/hiding tables instead, the button is ok and continues to work. I've tried a variety of controls instead of the button in a variety of places but it...
7
1451
by: John Smith | last post by:
As it is now apparently illegal in the UK to produce a website which is inaccessible to the disabled, which includes the JavaScript-disabled and images-disabled, am I right in thinking that the only ASP.NET postback capable control which is now of any use is the Button control? The LinkButton is clearly no good as it uses JavaScript and the ImageButton doesn't work in Mozilla with scripting and images turned off. Am I missing something or...
1
14368
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset button on my ASP.NET web page, and have an HTML reset button click clear 1) all validator text display and 2) validation summary display. Problem was clearing them and yet still leaving them working and visible if the user immediately began...
5
2647
by: | last post by:
Hi all, Has anyone been able to write some custom javascript on the onclick event of submit button to do certain things like disable submit button, only submit form once etc. This was a breeze in 1.1 since I could edit the .js file. Now in 2.0 I can no longer do this. Also, my code would have to be called after all client-side validation was done and was successful. Any ideas? TIA!
14
14633
by: teddysnips | last post by:
WINDOWS FORMS I've a form that has a textbox that allows the user to enter a string. On the LostFocus event, the textbox formats the string into a preferred format. However, if the user presses the "Save" button while the textbox has the focus, the LostFocus code doesn't run at the right time, so that the "Save" function is dealing with an incorrectly formatted string and the whole caboodle goes splat.
8
5850
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
I am working with Visual C# window and in my application I need to use a button ( NEXT) . The button should displays one panel with its objects each time it clicked. I already developed the codes for creating panels and their objects which will be questions and their answers. When the NEXT button clicked it suppose to display first panel with one question and its answers at a time. When the user selects an answer and click on NEXT button...
0
9455
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
9271
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
10031
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
9869
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
9708
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
8709
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
6534
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
5140
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...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.