Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
how to write javascript code in aspx.cs using asp.net...?
Please Help
 
Thanks
Posted 18-Oct-11 20:57pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think you need these functions : RegisterClientScriptBlock and RegisterStartupScript
 
read more at :
http://msdn.microsoft.com/en-us/library/aa478975.aspx[^]
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You can call any javascript function by this :-
 
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "whatever", "ShowGridViewColumn();", true);
 
or you can write it here also like this :-
 
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "whatever", "alert('Hello');", true);
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 414
1 Maciej Los 180
2 Richard MacCutchan 140
3 DamithSL 129
4 Kornfeld Eliyahu Peter 119


Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 20 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid