杂锦代码_3/*測試參數數組
杂锦代码_3aa("33","44","55");
杂锦代码_3function aa(id)
杂锦代码_3{
杂锦代码_3     var i, s, numargs = arguments.length;
杂锦代码_3     Response.Write (numargs);
杂锦代码_3     Response.Write (arguments[0]);
杂锦代码_3}
杂锦代码_3
杂锦代码_3function ArgTest(){
杂锦代码_3   var i, s, numargs = arguments.length;
杂锦代码_3   s = numargs;  
杂锦代码_3   if (numargs < 2)
杂锦代码_3      s += " argument was passed to ArgTest. It was ";
杂锦代码_3   else
杂锦代码_3      s += " arguments were passed to ArgTest. They were " ;
杂锦代码_3   for (i = 0; i < numargs; i++)
杂锦代码_3      {
杂锦代码_3         s += arguments[i] + " ";
杂锦代码_3      }
杂锦代码_3   return(s);
杂锦代码_3}
杂锦代码_3
*/


杂锦代码_3int numrows = int.Parse(DropDown1.SelectedItem.Value);
杂锦代码_3
杂锦代码_3
杂锦代码_3
// C#
杂锦代码_3
private void Button1_Click(object sender, System.EventArgs e)
{
杂锦代码_3   DataView aDataView 
= authorData.Tables[0].DefaultView;
杂锦代码_3   
foreach( DataRowView aRow in aDataView)
{
杂锦代码_3      TableRow aTableRow 
= new TableRow();
杂锦代码_3      TableCell aCell 
= new TableCell();
杂锦代码_3      aCell.Text 
= aRow["last"].ToString();
杂锦代码_3      aTableRow.Cells.Add(aCell);
杂锦代码_3      Table1.Rows.Add(aTableRow);
杂锦代码_3   }

杂锦代码_3}

杂锦代码_3
杂锦代码_3DataBinder.Eval(Container, 
"DataItem.ITEM_NO").ToString()
杂锦代码_3
杂锦代码_3AnchorLink.NavigateUrl 
= "controls_navigationtarget.aspx?name=" + System.Web.HttpUtility.UrlEncode(Name.Text);
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
using System;
杂锦代码_3
using System.Globalization;
杂锦代码_3
using System.Threading;
杂锦代码_3
杂锦代码_3
public class FormatDate
{
杂锦代码_3   
public static void Main()
{
杂锦代码_3      DateTime dt 
= DateTime.Now;
杂锦代码_3      
// Set the CurrentCulture property to U.S. English.
杂锦代码_3
      Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
杂锦代码_3      
// Display dt, formatted using the ShortDatePattern
杂锦代码_3      
// and the CurrentThread.CurrentCulture.
杂锦代码_3
      Console.WriteLine(dt.ToString("d"));
杂锦代码_3      
杂锦代码_3      
// Create a CultureInfo object for German in Germany.
杂锦代码_3
      CultureInfo ci = new CultureInfo("de-DE");
杂锦代码_3      
// Display dt, formatted using the ShortDatePattern
杂锦代码_3      
// and the CultureInfo object.
杂锦代码_3
      Console.WriteLine(dt.ToString("d", ci));
杂锦代码_3   }

杂锦代码_3}

杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3[C#]
杂锦代码_3DateTime dt 
= DateTime.Now;
杂锦代码_3DateTimeFormatInfo dfi 
= new DateTimeFormatInfo();
杂锦代码_3CultureInfo ci 
= new CultureInfo("de-DE");
杂锦代码_3
杂锦代码_3
// Make up a new custom DateTime pattern, for demonstration.
杂锦代码_3
dfi.MonthDayPattern = "MM-MMMM, ddd-dddd";
杂锦代码_3
杂锦代码_3
// Use the DateTimeFormat from the culture associated 
杂锦代码_3
// with the current thread.
杂锦代码_3
Console.WriteLine( dt.ToString("d") );  
杂锦代码_3Console.WriteLine( dt.ToString(
"m") );
杂锦代码_3
杂锦代码_3
// Use the DateTimeFormat from the specific culture passed.
杂锦代码_3
Console.WriteLine( dt.ToString("d", ci ) );
杂锦代码_3
杂锦代码_3
// Use the settings from the DateTimeFormatInfo object passed.
杂锦代码_3
Console.WriteLine( dt.ToString("m", dfi ) );
杂锦代码_3
杂锦代码_3
// Reset the current thread to a different culture.
杂锦代码_3
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-BE");
杂锦代码_3Console.WriteLine( dt.ToString(
"d") );
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3System.DateTime .Now .ToShortDateString()
杂锦代码_3
"2002-9-20"
杂锦代码_3System.DateTime .Now .ToShortTimeString()
杂锦代码_3
"7:45"
杂锦代码_3System.DateTime .Now .ToLongDateString()
杂锦代码_3
"2002年9月20日"
杂锦代码_3System.DateTime .Now .ToLongTimeString()
杂锦代码_3
"7:45:41"
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
if(e.Item.ItemType==ListItemType.Item
杂锦代码_3 
|| e.Item.ItemType==ListItemType.AlternatingItem)
{
杂锦代码_3杂锦代码_3.
杂锦代码_3
杂锦代码_3
杂锦代码_3
<PUBLIC:PROPERTY NAME="hiliteColor" />
杂锦代码_3
<PUBLIC:ATTACH EVENT="onload" FOR="window" ONEVENT="initColors()"  />
杂锦代码_3
<SCRIPT LANGUAGE="JScript">
杂锦代码_3function initColors()
{
杂锦代码_3  
// initialize the property
杂锦代码_3
  hiliteColor = (hiliteColor == null? "red" : hiliteColor;
杂锦代码_3}

杂锦代码_3
</SCRIPT>
杂锦代码_3
杂锦代码_3
杂锦代码_3
杂锦代码_3
{
杂锦代码_3  var studentNode, studentRef, studentName;
杂锦代码_3  var teachRef 
= presClass.childNodes.item(1).getAttribute('ref');
杂锦代码_3  var teachNode 
= xmlid.nodeFromID(teachRef);
杂锦代码_3
杂锦代码_3  classTitle.innerText 
= presClass.childNodes.item(0).text;
杂锦代码_3  classID.innerText 
= presClass.getAttribute('id');
杂锦代码_3  teacher.innerText 
= teachNode.childNodes.item(0).text;
杂锦代码_3
杂锦代码_3  var studentRefs 
= presClass.childNodes.item(2).childNodes;
杂锦代码_3  var tableStr 
= "<TABLE>";
{
杂锦代码_3    studentRef 
= studentRefs.item(i).getAttribute('ref');
杂锦代码_3    studentNode 
=  xmlid.nodeFromID(studentRef);
杂锦代码_3    studentName 
= studentNode.childNodes.item(0).text;
杂锦代码_3    tableStr 
+= "<TR><TD><SPAN ID=" + studentRef +
杂锦代码_3      
" onclick=getStudentInfo()>" +
杂锦代码_3      studentName 
+ "</SPAN></TD></TR>";
杂锦代码_3    }

杂锦代码_3  tableStr 
+= "</TABLE>";
杂锦代码_3  studentTable.innerHTML 
= tableStr;
杂锦代码_3  }

杂锦代码_3


杂锦代码_3你要想截获Windows的登陆框里的内容,就触及到windows的安全机制。
杂锦代码_3可以饶过它
!!!
杂锦代码_3
{
杂锦代码_3
if (document.FORM1.user.value=="")
{
杂锦代码_3    alert(
"Please Input username");
杂锦代码_3    document.FORM1.user.focus();
杂锦代码_3    
return false ;
杂锦代码_3}

杂锦代码_3
if (document.FORM1.password1.value=="")
{
杂锦代码_3    alert(
"Please input password!!");
杂锦代码_3    document.FORM1.password1.focus();
杂锦代码_3    
return false;
杂锦代码_3    }

杂锦代码_3    var xh
=new ActiveXObject("Microsoft.XMLHTTP");
杂锦代码_3    var uid
=document.FORM1.user.value;
杂锦代码_3    var href1
="http://lus/exchange/"+uid;
杂锦代码_3    var pass1
=document.FORM1.password1.value;
杂锦代码_3    xh.open (
"GET",href1,false,uid,pass1);
杂锦代码_3    xh.send(
"");
杂锦代码_3    
if (xh.status==200)
{
杂锦代码_3         window.open (href1);
杂锦代码_3    
return true;
杂锦代码_3    }
    
杂锦代码_3    
else
{
杂锦代码_3    document.FORM1.user.focus();
杂锦代码_3    
return false;
杂锦代码_3    }

杂锦代码_3 
杂锦代码_3}

{
杂锦代码_3window.FORM1.user.focus();   
杂锦代码_3}

杂锦代码_3
杂锦代码_3IIS :Integrated windows authentication
杂锦代码_3IIS
/Exchange:Base Authentication
杂锦代码_3


杂锦代码_3VB打开文件的四种方法.txt
杂锦代码_3
杂锦代码_3
杂锦代码_3Balena solution:
杂锦代码_3
杂锦代码_3
杂锦代码_3code:
--------------------------------------------------------------------------------Function FileText (filename$) As String
杂锦代码_3    
Dim handle As Integer
杂锦代码_3    handle 
= FreeFile
杂锦代码_3    Open filename$ 
For Input As #handle
杂锦代码_3    FileText 
= Input$(LOF(handle), handle)
杂锦代码_3    Close #handle
杂锦代码_3
End Function
杂锦代码_3
--------------------------------------------------------------------------------
杂锦代码_3
杂锦代码_3Balena 
second solution
杂锦代码_3
杂锦代码_3code:
--------------------------------------------------------------------------------Function FileText(ByVal filename As StringAs String
杂锦代码_3    
Dim handle As Integer
杂锦代码_3     
杂锦代码_3    
' ensure that the file exists
杂锦代码_3
    If Len(Dir$(filename)) = 0 Then
杂锦代码_3        Err.Raise 
53  ' File not found
杂锦代码_3
    End If
杂锦代码_3     
杂锦代码_3    
' open in binary mode
杂锦代码_3
    handle = FreeFile
杂锦代码_3    Open filename$ 
For Binary As #handle
杂锦代码_3    
' read the string and close the file
杂锦代码_3
    FileText = Space$(LOF(handle))
杂锦代码_3    
Get #handle, , FileText
杂锦代码_3    Close #handle
杂锦代码_3
End Function
杂锦代码_3
--------------------------------------------------------------------------------
杂锦代码_3
杂锦代码_3Chirs Eastwood solution
杂锦代码_3
杂锦代码_3code:
--------------------------------------------------------------------------------Dim iFile As Integer 
杂锦代码_3
On Error Resume Next 
杂锦代码_3iFile 
= FreeFile 
杂锦代码_3GetFileContents 
= Space(FileLen(FileName)) 
杂锦代码_3Open FileName 
For Binary As #iFile 
杂锦代码_3
Get #iFile, , GetFileContents 
杂锦代码_3Close #iFile 
杂锦代码_3
' 
杂锦代码_3
End Function
杂锦代码_3
--------------------------------------------------------------------------------
杂锦代码_3
杂锦代码_3Cakkie solution
杂锦代码_3
杂锦代码_3code:
--------------------------------------------------------------------------------Dim FFile as Integer
杂锦代码_3
Dim strFile as string 
杂锦代码_3FFile 
= FreeFile
杂锦代码_3Open 
"yourfile.txt" for input as #FFile
杂锦代码_3    strFile 
= input(FileLen("yourfile.txt"),FFile)
杂锦代码_3Close #FFile
杂锦代码_3
杂锦代码_3

相关文章: