Advertisement

10.13.2008 at 02:58AM PDT, ID: 23809000 | Points: 500
[x]
Attachment Details

datagrid validation with Ajax

Asked by Soluga in Asynchronous Javascript and XML (AJAX), .NET, Microsoft Visual Basic.Net

Tags:

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.

ThanksStart Free Trial
[+][-]10.18.2008 at 06:58PM PDT, ID: 22750621

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 - Hierarchy / EE_QW_2_20070628