Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing some Javascript code
Message
 
To
05/11/2004 12:47:15
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00958561
Message ID:
00958642
Views:
16
>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...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform