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]
16. February 2011
xhinker
Silverlight
This is a silverlight application that can take a photo via your computer's webcam and save photo to local disc.
1. February 2011
xhinker
WF4
Opening a WF4 workflow in xaml editor. you can find that sad:XamlDebuggerXmlReader.Filename attribute point to a physical file path. What a mysterious physical path. Why do we need this attribute? this attribute is used for WF4 workflow debugging. VS debugger will find the break point code line in t...
[More]
21. January 2011
xhinker
WF4
When you host Workflow in IIS/Appfabric. You may have to set the unhandled exception behavior:
<workflowUnhandledException action="AbandonAndSuspend" />
So, what is the difference between Abandon and AbandonAndSuspend. By default, WorkflowServceHost has the ability to resume persisted work...
[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]
20. January 2011
xhinker
WF4
Persistence Store and Instance Store actually indicate the same thing.In WF3/3.5, the type is
SqlWorkflowPersistenceService
So, people usually call it Persistence Store. while in WF4 the type is:
SqlWorkflowInstanceStore
People call it Instance store. There are other differen...
[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]
17. January 2011
xhinker
ASPNET
First, we need to get all the files ready:
Open Admin.aspx file and add TinyMCE to page:
<!-- TinyMCE --> <script type="text/javascript" src="Editors/TinyMCE/tiny_mce.js"></script> <script type="text/javascript"> &nbs...
[More]
16. January 2011
xhinker
ASPNET
First, create a new .net4.0 Class Library project, add reference to System.Web.dll. then add a new class file to the project named say MyHttpHandler.cs:
using System;using System.Web; namespace Xhinker.TableTopic { public class MyHttpHandler:System.Web.IHttpHandler { &n...
[More]