Windows Live writer is a good log writing tool, butCodeThe problem is a headache. I searched for some code plug-ins on the Internet. I recommend several useful plug-ins.
1. insert code for Windows Live writer
The effect is as follows:
Using System; Using System. Collections. Generic; Using System. LINQ; Using System. Web; Using System. Web. UI; Using System. Web. UI. webcontrols; Namespace Webapplication1 { Public Partial Class Testip: system. Web. UI. Page {Protected Void Page_load ( Object Sender, eventargs e ){ String IP = request. servervariables [ "Http_x_forwarded_for" ]; If ( String . Isnullorempty (IP )){ // Directly obtain the Client IP address without a proxy IP Address IP = request. servervariables [ "Remote_addr" ] ;}}}
Rating:There is no clear border, but it looks refreshing.
: Http://gallery.live.com/liveItemDetail.aspx? Li = 1f57bd9b-a692-4593-9e9e-e2962d9c0eee & bt = 9 & PL = 8
2. code snippet plugin
Effect:
1: UsingSystem;
2: UsingSystem. Collections. Generic;
3: UsingSystem. LINQ;
4: UsingSystem. Web;
5: UsingSystem. Web. UI;
6: UsingSystem. Web. UI. webcontrols;
7:
8: NamespaceWebapplication1
9: {
10: Public partial class testip: system. web. UI. page
11: {
12: protected void page_load ( Object sender, eventargs e)
13: {
14: string IP = request. servervariables [ "http_x_forwarded_for" ];
15:If(String. Isnullorempty (IP ))
16:{
17: // obtain the Client IP address directly without a proxy IP address
18:IP = request. servervariables ["Remote_addr"];
19:}
20:}
21:}
22:}
Rating:With a clear border and background color, the code is pretty outstanding
: Http://www.box.net/shared/j14u8rtm6g
3. codepaste plugin for Windows Live writer
Effect:
Hide row number Copy code ? This is Program Code.
-
UsingSystem;
-
UsingSystem. Collections. Generic;
-
UsingSystem. LINQ;
UsingSystem. Web;
-
UsingSystem. Web. UI;
-
UsingSystem. Web. UI. webcontrols;
-
-
NamespaceWebapplication1
-
{
-
Public partial classTestip: System. Web. UI.Page
-
{
-
Protected voidPage_load (ObjectSender,EventargsE)
-
{
StringIP = request. servervariables ["Http_x_forwarded_for"];
-
If(String. Isnullorempty (IP ))
-
{
-
// Directly obtain the Client IP address without a proxy IP Address
-
IP = request. servervariables ["Remote_addr"];
-
}
-
}
-
}
-
}
-
Rating:After the code is copied, insert-> and paste the source code, which is convenient and beautiful.
: Http://public.blu.livefilestore.com/y1ps6diGhJIvBML_030iJ_wpGw0iitdKsIsvP5qv5U9HhAoSqH_2DqxEPkQ7NVZGDJMTuT-LhivnXd73x9MIKkw9w/CodePaste-v1.0.3345.rar? Download
4. highlight4writer
Effect:
Using System; Using System. Collections. Generic; Using System. LINQ; Using System. Web; Using System. Web. UI; Using System. Web. UI. webcontrols; Namespace Webapplication1 {Public Partial Class Testip: system. Web. UI. Page { Protected Void Page_load ( Object Sender, eventargs e ){ String IP = request. servervariables [" Http_x_forwarded_for "]; If ( String . Isnullorempty (IP )){ // Chinese garbled characters
IP = request. servervariables ["Remote_addr"] ;}}}Evaluation: Very good, but to download the Chinese version, the English version of the Chinese version will contain garbled characters, unless your English level is OK, it doesn't matter.
: Http://www.codeplex.com/wikipage? Projectname = highlight4writer