小迪的Blog
学习ing...(注明:该Blog中的任何信息都非原创,只是作为个人的阅读笔记)

                <script language="javascript">                        
                    
function printpage()
                    {
                            
var aaa = document.all.printdiv.innerHTML;
                            
var printOpen
                            printOpen
=window.open('WebForm21.aspx','open1','width=600,height=390,top=100,left=100');
                            printOpen.document.body.innerHTML 
= aaa;
                            printOpen.window.print(document.Print);
                            printOpen.close(); 
                    }
                
</script>

http://blog.csdn.net/net_lover/archive/2004/07/06/35228.aspx
http://community.csdn.net/Expert/topic/3330/3330368.xml?temp=.4426081


int d=10;

   int x=Convert.ToInt32(d.ToString("x"),16); //把16进制的字符串变回10进制的.
   

   Response.Write(d.ToString("x") + "<br>");
   Response.Write(x + "<br>");
   Response.Write(Convert.ToInt32(0xA));

   

   Response.Write(EncodingSMS("AB测试C")); 
   



http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/frlrfSystemNetHttpWebRequestClassTopic.asp


http://community.csdn.net/Expert/topic/3823/3823946.xml?temp=.152096

http://community.csdn.net/Expert/topic/3448/3448128.xml?temp=.2261927

http://community.csdn.net/Expert/topic/3136/3136255.xml?temp=.5062525



public string EncodingSMS(string s)
  {   
   string result = string.Empty;
   
   for(int i = 0; i < s.Length; i++)
   {
    if(s[i] <= 255)
    {  
     byte[] temp1 = System.Text.Encoding.ASCII.GetBytes(s[i].ToString());
     result += temp1[0].ToString("X"); 
    }
    else //中文
    {     
     byte[] temp2 = System.Text.Encoding.Default.GetBytes(s[i].ToString());

     for(int j = 0; j < temp2.Length; j ++)
     {
      result += temp2[j].ToString("X");
     }
     
    }

   }
   return result;

  }

posted on 2005-04-21 13:21  小迪  阅读(297)  评论(0)    收藏  举报