|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 By textarea do you mean the non-.NET <textarea> or the appropriate
<asp:TextBox TextMode="MultiLine">? You need to be using the latter... 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 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 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 > > I see in my FTP folder the same version of 1.1 is there. 2.0 is also
there. Brett 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 > > 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 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 > > |
|||||||||||||||||||||||