Hi,
I have a template in a datagrid with a save button. I want to put ajax validation on the button, at the moment I just have ....
Dim oSaveButton As Button = New Button()
oSaveButton.CssClass = "tdText"
oSaveButton.OnClientClick = "grid1.save();return false"
oSaveButton.Text = "Save"
Which works fine, but does not validate, I have some dialogue code that opens validation dialogue, but I cannot seem to integerate with my button.. the code is below..
Protected Sub btnSubmit_Click(ByVal o As Object, ByVal e As EventArgs) Handles btnSubmit.Click
If (txtName.Text.Trim() = "") Then
myDialog.Visible = True
myDialog.VisibleOnLoad = True
Else
myDialog.Visible = False
Response.Write("Your name [" & txtName.Text & "] has been submitted")
End If
End Sub
If anyone could help I would be very grateful.
Thanks
Start Free Trial