Posts

Showing posts from December, 2010

How to find the top 10 largest files or directories in Linux

du -a /var | sort -n -r | head -n 10

Execute JavaScript in ASP.NET Code Behind

If you want to execute JavaScript in code behind for example after an event, you can: ScriptManager.RegisterStartupScript(this, GetType(), "anyName", "myScript();", true);

Include JavaScript in ASP.NET Master Page

When I directly put the following script in the markup of Master File. There is also some JavaScript error. It is because .aspx in different folder may using this master page, so javascript path may become incorrect. To solve it, you need to register the javascript in page_load method. Page.ClientScript.RegisterClientScriptInclude("jquery", ResolveUrl("~/Script/jquery-1.4.2.min.js"));