Home All Groups Group Topic Archive Search About

How to validate textarea?

Author
21 Jan 2006 6:50 PM
brett
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

Author
21 Jan 2006 7:28 PM
agapeton
By textarea do you mean the non-.NET <textarea> or the appropriate
<asp:TextBox TextMode="MultiLine">?

You need to be using the latter...
Author
21 Jan 2006 7:51 PM
brett
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
Author
21 Jan 2006 8:12 PM
brett
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
Author
21 Jan 2006 9:30 PM
Elton W
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


Show quote
"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
>
>
Author
22 Jan 2006 6:39 PM
brett
I see in my FTP folder the same version of 1.1 is there.  2.0 is also
there.

Brett
Author
23 Jan 2006 2:42 AM
Elton W
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

Show quote
"brett" wrote:

> I see in my FTP folder the same version of 1.1 is there.  2.0 is also
> there.
>
> Brett
>
>
Author
23 Jan 2006 2:50 AM
brett
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
Author
23 Jan 2006 6:12 PM
Elton W
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

Show quote
"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
>
>

AddThis Social Bookmark Button