Created
July 24, 2015 01:13
-
-
Save townivan/778ef1f7004cda5d674b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Import Namespace="System.IO" %> | |
<%@ Import Namespace="System.Data" %> | |
<%@ Page Language="C#" Debug="true" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<script language="C#" runat="server"> | |
void Page_Error(Object source, EventArgs e) | |
{ | |
String message = "<font face=verdana color=red>" | |
+ "<h4>" + Request.Url.ToString() + "</h4>" | |
+ "<pre><font color='red'>" | |
+ Server.GetLastError().ToString() + "</pre>" | |
+ "</font>"; | |
Response.Write(message); | |
} | |
</script> | |
<script runat="server"> | |
void Page_Load(Object s, EventArgs e) | |
{ | |
// Display using current (en-us) culture's short date format | |
DateTime thisDate = new DateTime(2008, 3, 15); | |
Response.Write(thisDate.ToString("d") + "<br>"); | |
Response.Write(thisDate.ToString("y") + "<br>"); | |
//Console.WriteLine(thisDate.ToString("d")); // Displays 3/15/2008 | |
} // end void Page_Load(Object s, EventArgs e) | |
private int timeOut; | |
private void Page_Init(object sender, System.EventArgs e) | |
{ | |
timeOut = Server.ScriptTimeout; | |
// Give it 1 hour = 3600 seconds | |
Server.ScriptTimeout = 3600; | |
} | |
private void Page_Unload(object sender, System.EventArgs e) | |
{ | |
Server.ScriptTimeout = timeOut; | |
} | |
// Note: XPath requires .NET 2.0 (minumum) | |
</script> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head id="Head1" runat="server"> | |
<title>date</title> | |
</head> | |
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 13px"> | |
<form id="form1" runat="server" enctype="multipart/form-data"> | |
<div> | |
</div> | |
</form> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment