Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing some Javascript code
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00958561
Message ID:
00958642
Vues:
17
>Ok, I have found various ways to do it.

>Using the Page_Load() could be such as:
ShowText.Attributes.Add("onclick", "javascript:ShowAlert(window.document.Form1.FirstName.value)")
>Or, generating the entire HTML on the Click() event of the control such as:
Response.Write("<SCRIPT>alert(""This is my text."")</SCRIPT>")
>But, I am mostly interested in a more direct way to achieve that directly from the Click() event such as:
MyObjectForJavascript.Something="ShowAlert(""This is my text."")"
>Is that possible?

The only way you could do that would be to essentially sub class the object, through creating a web control project. You could then add the method to the base class.

Hope that helps...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform