Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HTML/JScript in WebForms?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00761405
Message ID:
00765938
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
There are a few more steps involved for this:

1. add runat="server" and id="someid" to your body-tag, like
        <body id="someid" runat="server">
2. in the code behind class add a line of code to declare the control
        protected HtmlGenericControl someid;
3. whereever in code you want to add the attribute code you can like this
        someid.Attributes.Add("onUnload","alert('UnLoad worked!');");
>Hi, Cathi!
>
>>>
>You can execute javascript code to run when the page is posted back. Here is an example of having another window popup when the page is returned:
><<
>
>Ok, I got it - many thanks!
>
>BTW: Do you have any idea for dealing with the OnUnload attribute of the body tag in the same manner too?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform