how to use the rangevalidator controll
-
how to use the rangevalidator control with controls of a grid view i can access controls of a grid view by this way : Dim myControl1 As Control = Me.FormView1.FindControl("zipTextBox") Dim t As TextBox If (Not myControl1 Is Nothing) Then t = myControl1 a.ControlToValidate = "" a.Text = "eror ya hmar" ' Get control's parent. MsgBox(t.Text) Else MsgBox("Control not found.....") End If ao i want to make a rangevalidatot to control the value in the textbox t but the problem is if i say MYrangevalidator.ControlToValidate = t t should be a string ???????
-
how to use the rangevalidator control with controls of a grid view i can access controls of a grid view by this way : Dim myControl1 As Control = Me.FormView1.FindControl("zipTextBox") Dim t As TextBox If (Not myControl1 Is Nothing) Then t = myControl1 a.ControlToValidate = "" a.Text = "eror ya hmar" ' Get control's parent. MsgBox(t.Text) Else MsgBox("Control not found.....") End If ao i want to make a rangevalidatot to control the value in the textbox t but the problem is if i say MYrangevalidator.ControlToValidate = t t should be a string ???????
-
how to use the rangevalidator control with controls of a grid view i can access controls of a grid view by this way : Dim myControl1 As Control = Me.FormView1.FindControl("zipTextBox") Dim t As TextBox If (Not myControl1 Is Nothing) Then t = myControl1 a.ControlToValidate = "" a.Text = "eror ya hmar" ' Get control's parent. MsgBox(t.Text) Else MsgBox("Control not found.....") End If ao i want to make a rangevalidatot to control the value in the textbox t but the problem is if i say MYrangevalidator.ControlToValidate = t t should be a string ???????
-
if you setting the Id of the control "zipTextBox" then you just need to do this MYrangevalidator.ControlToValidate = t.ID; bcz ControlToValidate only need ID(string) of the control you want to validate. Nav.
thanks i tried it but it does't work too
-
You simply put the RangeValidator in the FormView control as you would with the TextBox, and simply assign the id of the TextBox to the
ControlToValidate
property of the validator. For more information, see RangeValidator[^]hello thanks it was a good idea and it works thanks