[Web]Get Start ASP.NET Core Quickly

Steps to create a new ASP.NET Core SampleInstall dotnet coreDownload and install needed tool and pac [More]

[Web]My Javascript function snippets

1. Get host URL function getHostUrl() {     var protocol = window.location.protocol;     var host = window.location.host;     return protocol + "//" + host; } 2.Timer fu... [More]

[ASPNET4]Problem Solved: CSS file cannot be accessed

Every several weeks I was haunted by this annoying problem and waste my life for hours!!! This time, I am gonna file it down for future and also others. Symptom: Site.css file under "Styles" folder cannot be accessedAnd, page will be appeared like this: Even after the following code have been a... [More]

[ASPNET]ASPNET Miscellanea

1. Query String. Client URL: http://localhost:8088/TableTopic/Post.aspx?id=12345678&name=andrewzhuServer Side: public partial class Post : System.Web.UI.Page {    protected void Page_Load(object sender, EventArgs e) ... [More]

[ASP.NET]How Long Will HTTPHandler Intance Be Pooled

If the IsReusable property is set to true. How long will the instance be pooled?     It is pooled for the life of the application pool. And, it seems we are not able the control the time span. public class HttpHandlerTest:System.Web.IHttpHandler {   &n... [More]

[ASP.NET]Show Menu Items For Different Roles

In an ASP.NET site, some time we want to show a menu item for administrator only. For example, we want to display "edit" link for blogger owner. Below are steps to take action to achieve this feature:1. Create a Web.sitemap file and add menu items to this file <?xml version="1.0" enco... [More]

[ASPNET]Save TinyMCE Content

To save the content of TinyMCE in Ajax way. First, we need to execute the following code to dump the content to the textarea html control. tinyMCE.activeEditor.save(); Then, get the text content: var text = $("#commentEditor").text(); Next, send data back to server:  ... [More]

[JQuery]Using JQuery Ajax

1. Loading JQuery and get it ready.    <script type="text/javascript" src="Scripts/jquery-1.4.1.js">   </script>   <script type="text/javascript">       $(document).ready(function ... [More]