473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Changing Page_ValidationActive server-side??

I have several RequiredFieldValidator in my page, but I need to do postback,
so I have to disable them temporarily. I do this with Page_ValidationActive
on client-side ("onClick="Page_ValidationActive=false;").
How can I change this property back to true in my server-side code? I need
to do it when I ckick on a server-side button so that now I can validate that
all the textboxes are filled.

Thanks.
Feb 23 '07 #1
1 6219
Howdy,

It's easier to do it via CausesValiadtion property:

<asp:TextBox runat="server" ID="txt1" />
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1"
Text="Error1"
ControlToValidate="txt1" Display="dynamic" EnableClientScript="true" />
<asp:TextBox runat="server" ID="txt2" />
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2"
Text="Error2"
ControlToValidate="txt2" Display="dynamic"
EnableClientScript="true" />
<asp:Button runat="server" ID="btn" Text="submit"
CausesValidation="false" OnClick="btn_Click" />
--
Milosz
"VMI" wrote:
I have several RequiredFieldValidator in my page, but I need to do postback,
so I have to disable them temporarily. I do this with Page_ValidationActive
on client-side ("onClick="Page_ValidationActive=false;").
How can I change this property back to true in my server-side code? I need
to do it when I ckick on a server-side button so that now I can validate that
all the textboxes are filled.

Thanks.
Feb 24 '07 #2

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

Similar topics

23
by: Mark Parnell | last post by:
I'm relatively new to PHP, and have just converted a site from ASP to PHP. There is one thing I haven't managed to do, though. When the site was using ASP, I had one file (called variables.asp),...
2
by: amnésia | last post by:
Hi there. I have to change the drive letter where SQL server have his datfiles (master included). If I do that, ob the SQL fail to start, becouse it's unable to find the master datfiles. Is it...
1
by: RWC | last post by:
Hello, I have SQL Server 2000 Enterprise Edition, and I'd like to change the default port to something else (we'll use 2033 for this example). I've tried to connect from another computer on the...
13
by: Peter | last post by:
Can anyone tell me how to change the data type of a field in a table created with a make table query? The field is a binary and must be changed to text. alternately does anyone know how to specify...
1
by: Rolln_Thndr | last post by:
I'm vey new to network programing and have a few rather fundemental questions. I'm creating a very basic UDP proxy server and having a few issues regarding the sockets. Is it possible to change...
1
by: Rod | last post by:
We have a .NET application which is installed on one machine (let's call it server 2), and we point to it using IIS from another machine (our edge server, which I'll call server 1). So, server 1...
1
by: Samridhi Kumar Shukla | last post by:
I am facing technical difficulti in using server connection control because we cannot change the path once fixed .. one way is to edit the code of the form generated code but though it allow to...
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
9
by: David | last post by:
With a non-server app there is one instance of the program running and one user 'using' it at a time. With this scenario I'm pretty comfortable with variable scope and lifetime. With a server app...
4
by: John Kotuby | last post by:
Hi all, I have a simple user-form which accepts contact and profile information for the user to edit and save. All the textboxes are working fine and displaying the expected data, both when the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...
0
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...
0
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...

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.