Posts

NAT example

http://technet.microsoft.com/en-us/library/cc780783(WS.10).aspx then network address translation (NAT) maps all private addresses on 192.168.0.0 to the IP address of w1.x1.y1.z1. If multiple private addresses are mapped to a single public address, NAT uses dynamically chosen TCP and UDP ports to distinguish one intranet location from another. Note The use of w1.x1.y1.z1 and w2.x2.y2.z2 is intended to represent valid public IP addresses as allocated by the Internet Assigned Numbers Authority (IANA) or an ISP. The following illustration shows an example of using NAT to transparently connect an intranet to the Internet. If a private user at 192.168.0.10 uses a Web browser to connect to the Web server at w2.x2.y2.z2, the user's computer creates an IP packet with the following information: Destination IP address: w2.x2.y2.z2 Source IP address: 192.168.0.10 Destination port: TCP port 80 Source port: TCP port 5000 This IP packet is then forwarded to the NAT protocol, which translates the ...

List of HTTP status codes

1xx Informational 2xx Success 3xx Redirection 4xx Client Error 5xx Server Error

RenderUserControl by pasing parameters

public static string RenderUserControl(string path, NameValueCollection nvc) { Page pageHolder = new Page(); UserControl viewControl = (UserControl)pageHolder.LoadControl(path); if (nvc != null && nvc.Count > 0) { Type viewControlType = viewControl.GetType(); foreach (string key in nvc.Keys) { PropertyInfo property = viewControlType.GetProperty(key); property.SetValue(viewControl, nvc[key], null); } } pageHolder.Controls.Add(viewControl); StringWriter output = new StringWriter(); HttpContext.Current.Server.Execute(pageHolder, output, true); return output.ToString(); }

testdriven.net NUnit debug

http://www.testdriven.net/download_release.aspx?LicenceType=Personal

Add tab Index and background

jQuery(document).ready(function() { jQuery("#Body").addClass("bgnd"); jQuery(function(){ var tabindex = 1; jQuery('input,select,.RELIndexer,textarea').each(function() { if (this.type != "hidden") { var jQueryinput = jQuery(this); jQueryinput.attr("tabindex", tabindex); tabindex++; } }); }); });

EnterToClick

//do postback on press of "enter key" function EnterToClick(ctrId, e, arg) { var keyCode = (e.keyCode) ? e.keyCode : e.which; if(keyCode == 13) { __doPostBack(ctrId, arg); } } onkeydown="javascript:EnterToClick(' ', event, 'Login Now');"

Execute Link

function SearchImage(obj, e, arg) { eval(jQuery("#" + obj.id + " a.CommandButton" )[0].href) }