8. September 2016
AndrewZhu
ASPNET , DotNet
Steps to create a new ASP.NET Core SampleInstall dotnet coreDownload and install needed tool and pac
[More]
11. July 2012
xhinker
ASPNET , Web
1. Get host URL
function getHostUrl() {
var protocol = window.location.protocol;
var host = window.location.host;
return protocol + "//" + host;
}
2.Timer fu...
[More]
15. November 2011
xhinker
ASPNET
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]
6. June 2011
xhinker
ASPNET
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]
18. May 2011
xhinker
ASPNET
Javascript:
<script type="text/javascript">
var c = 0;
var t;
var timerIsOn = 0;
$(document).ready(function () {
//other event...
$("#testBtn").click(function () {
document.getElementById('txt').value&nb...
[More]
3. May 2011
xhinker
ASPNET
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]
19. February 2011
xhinker
ASPNET
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]
20. January 2011
xhinker
ASPNET
To get the content of an textarea ,we can use: $("#textareaId").html();works In IE8, but doesn't work in Firefox 3.6. To get the value in Firefox, we can use: $("#textareaId").val();So, What is the difference between html() and val() and ...
[More]
18. January 2011
xhinker
ASPNET
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]
18. January 2011
xhinker
ASPNET
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]