Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello all

I Have UpdatePanel and Timer.inside Update Panel is a Textarea.



XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
                  <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">
                  </asp:Timer>



<textarea id="TextArea_Body" runat="server" readonly="readonly" clientidmode="Static" ></textarea>
 </ContentTemplate>
            </asp:UpdatePanel>




C#
$(document).ready(function () {
            $('textarea').mouseenter(function () {
                alert('');


            });

        });


when Pre Refresh:
when Cursor Enter to Textarea alert window Show
but when Page Refresh :
when Cursor Enter to Textarea alert window Dont show???????????????????????????????
why???Please Help me
thanks so much
Posted
Updated 1-Dec-12 2:14am
v2

1 solution

Hi,

you have not mention you are registering javascript in your page. you need to associate your javascript in page load event. if page will be refresh javascript need to be registered again.

you need to use Page.RegisterStartupScript to register your javascript code for the textbox.

hope this information helps you.

thanks
-amit
 
Share this answer
 
Comments
Seyed Ahmad Mirzaee 1-Dec-12 9:08am    
Thanks So Much
how can i register my javascript code for the textbox?
maybe Give me a sample code?
please Help me Thanks
:)
AmitGajjar 1-Dec-12 11:32am    
see http://forums.asp.net/t/1751171.aspx/1 link and c# code will be in page load event.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900