Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Call Javascript function on itemcommand.
i have used
C#
ScriptManager.RegisterStartupScript(this.Page, typeof(Page), Guid.NewGuid().ToString(), "Display();", true);

but it doesn't work.
Posted
v2
Comments
Mahesh Bailwal 30-May-13 4:46am    
are you getting some JavaScript error?

1 solution

Hi Softprga,

Try this and let me know..

C#
ClientScript.RegisterStartupScript(GetType(), "Load", "<script type='text/javascript'>alert('Hi!');</script>");



Thank you,
RelicV
 
Share this answer
 
Comments
RelicV 30-May-13 6:05am    
If this works, then you could modify the relevant JS code inside the script block.!
softprga 30-May-13 7:24am    
this not work.
i have used "asp:ListView " inside update panel "asp:UpdatePanel ".Is this reason it's not works?
RelicV 30-May-13 7:46am    
softprga, I need to know what you are doing in itemcommand. Could you please explain that..?

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