Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   ASPX (.net) (http://www.forosdelweb.com/f78/)
-   -   problema con control de validacion (http://www.forosdelweb.com/f78/problema-con-control-validacion-591406/)

roger1187 29/05/2008 11:35

problema con control de validacion
 
Cita:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,versfinancieraion=1.0.0 .0,publicKeyToken=836f606ede05d46a,culture=neutral " %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data.SqlClient.SqlParameter" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="vb" runat="server">
Sub Page_Load(sender1 as Object, e1 as EventArgs)
if r1.checked then
rvb.MaximumValue = 8000[/COLOR]
end if
if r2.checked then[/COLOR]
rvb.MinimumValue = 2000
end if
end sub

</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form runat="server">
<asp:TextBox ID="TextBox1" runat="server" />
<asp:RangeValidator ID="rvb" ControlToValidate="TextBox1"></asp:RangeValidator><asp:RadioButton ID="r1" runat="server" Text='r1' GroupName="r" AutoPostBack="true" />
<asp:RadioButton ID="r2" Text="r2" runat="server" GroupName="r" AutoPostBack="true" />

</form>
</body>
</html>
Tengo el sgte problema ....me gustaria poder controlar el tipo de rangevalidator q puede haber......x ejemplo si elijo el radiobutton "r1" que en el textbox solo me permita 1 valor minimo 8000 y si es el radiobutton "r2" q salga el valor de 2000 como minimo
el rangevalidator tiene como ID ="rvb" ....no se si me falta algo... o esta mal el codigo espero q me puedan ayudar


La zona horaria es GMT -6. Ahora son las 12:10.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.