473,385 Members | 1,712 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,385 software developers and data experts.

How to validate textarea?

If I try to use a RequiredFieldValidator control to make sure a
textarea isn't empty, I get an error similar to

Unable to find control id 'comment' referenced by the
'ControlToValidate' property of 'rvfComment'.

I'm guessing this control does not validate a textarea. What else can
I do for this besides checking its length on postback?

Thanks,
Brett

Jan 21 '06 #1
8 3683
By textarea do you mean the non-.NET <textarea> or the appropriate
<asp:TextBox TextMode="MultiLine">?

You need to be using the latter...

Jan 21 '06 #2
You are right. I was using the wrong element.

This is what I had:
<TEXTAREA id="txtcomment" name="comment" rows="5" wrap="soft" cols="50"
runat="server"></TEXTAREA>

You can see it is runat="server". I grabbed it off the VS.NET toolbar.
If this is a regular HTML textarea, how can it runat server?

Thanks,
Brett

Jan 21 '06 #3
For some reason, the validation works on my local machine but not on
the server. It will validate everything but once all of the fields are
valid and I click submit, nothing happens. The submit seems to be
disabled on the server after valid data has been entered. What may be
happening?

Thanks,
Brett

Jan 21 '06 #4
Hi Brett,

Check .NET Framework version in your server. It might be different from the
version in your developing machine. And installing framework sp1 may solve
the problem.

HTH

Elton Wang
"brett" wrote:
For some reason, the validation works on my local machine but not on
the server. It will validate everything but once all of the fields are
valid and I click submit, nothing happens. The submit seems to be
disabled on the server after valid data has been entered. What may be
happening?

Thanks,
Brett

Jan 21 '06 #5
I see in my FTP folder the same version of 1.1 is there. 2.0 is also
there.

Brett

Jan 22 '06 #6
What I mean is that in both server and your local machine you have
Framework Version:1.1.4322. But they might be little bit different. For
example, in server it’s Framework Version:1.1.4322.573. But in local machine
it’s Framework Version:1.1.4322.2XXX.

Elton

"brett" wrote:
I see in my FTP folder the same version of 1.1 is there. 2.0 is also
there.

Brett

Jan 23 '06 #7
If that really is the problem, what is the resolve for that? I don't
have access to the ASP.NET admin on the share.

Thanks,
Brett

Jan 23 '06 #8
In our case, we installed .NET Framework 1.1 SP1 on server. The version info
is like:

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

That solved the problem.

HTH

Elton

"brett" wrote:
If that really is the problem, what is the resolve for that? I don't
have access to the ASP.NET admin on the share.

Thanks,
Brett

Jan 23 '06 #9

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

Similar topics

6
by: deko | last post by:
I have a basic Feedback form - I want to prevent blank entries. The problem with the below code is that the form still Posts if the 'message' field is blank. The form will not post if the...
2
by: Josh | last post by:
Is it possible to make a textarea required only if a certain value is selected from a <select>? I am trying to make a textarea named ObjOther required only if the value OT is selected from a...
3
by: Neil Shaw | last post by:
Hi really need some help with validating a textarea box. basically i have a text area box that must not have more the 910 characters entered and they must not be spread over more than 23 lines....
2
by: Tim Mills | last post by:
The following code asks the user to sumbit a name, email address, and some text for a quotation via a FORM. I have written a javascript function to evaluate the fields in the form and pop-up a...
1
by: gimme_this_gimme_that | last post by:
Is there a way that Javascript can validate that text in a textarea is UTF-8?
1
by: MikeinDC | last post by:
I found some free js that I want to use in a class project. The original HTML used <form name="form1"> and the W3C validator I am required to use fails it. It says there is no attribute"name"....
1
by: john.swilting | last post by:
I am not good in Javascript I begin I do not understand why my function does not go I post my code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">...
9
by: Dracenfels | last post by:
I've pulled together an online form that creates a number of tables dependant on the results of a dropdown list, i.e. 2 from the list creates two input tables, 10 creates 10 tables etc. The script...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.