first way is
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "document.getElementById('" + button2.ClientID + "').style.display='none';", true); |
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "MyJavascriptFunction();", true); |
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
18 comments :
Hi..
Your site is really nice.i learned many things from this site.Please try to write the above article with some examples.This could be useful for the beginners like me.
1. RegisterClientScriptBlock
2.RegisterClientScriptInclude
3.RegisterStartupScript
4. RegisterOnSubmitStatement
I had a problem with typeof(Page) so I resorted to the following with success:
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "Script", "function();", true);
worked for me...
Thank You a lot...
Its Not Working...........
yes its not working .....
we can call the alert from this method but call a function is not working ...!
how to call code behind fuction from javascript????
what is htphandler and http module please help where used in exactly in projects
i Want the coding for telerik grid
Hi,
I have created one javascript file on button click i lost my effect .
How can i call my Javascript file in code behind on button click .
Thanks
Mayank
hi sureshji
me also suresh can u pls tel me the vise versa of the above concept ...............
thanks in advance
ScriptManager.RegisterStartupScript(this, this.GetType(), "Script", "showmydiv()", true);
try this
Hi
I have three text boxes, the sum of the first and second textbox display in the third text box while leaving text box2 using java script
Thanks in advance
Not working
I have a problem that
I have 2 popup divs,
on that divs one div is opened from by gridview row command, than the 2nd popup should be open from 1st popup.
i wrote a javascript method, so from that methop can i call 2nd popup too.. ans my question plz..
my code is as follows..
in .aspx page..
in this I m getting 1st popup .. from 1st popup i want to open 2nd one plz ans to my problem..
warmasree@gmail.com
hello Even both codes are not working for me.. should we import any lib files. ???
thanks in advance.
How can I get the return value of javascript function???
Note: Only a member of this blog may post a comment.