Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OnClick Attribute
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
OnClick Attribute
Divers
Thread ID:
01201551
Message ID:
01201551
Vues:
58
Hi All,

Is there a way to add 2 "onclick" attributes to the ASP.NET command button ? The following code works but only last attribute is added:
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load        
        'add this attribute once (and not on every page load) - place the code in the Not Page.IsPostBack block
        If Not Me.Page.IsPostBack Then
            '--add java confirmation to command button
            Me.cmdEmailLDL.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to send an email to the Customer with a Live Date Letter attachment?');")
            '--add a client-side OnClick event to the EmailLDL button
            Me.cmdEmailLDL.Attributes.Add("onclick", "cmdEmailLDL_Click(this);")
        End If
    End Sub
Thank you,
DAniel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform