asp.net public Function valuesepr (ByVal rawstring As String, ByVal Sepchar as String) as String
If InStr (1, rawstring, Sepchar) Valuesepr = Microsoft.VisualBasic.Right (Rawstring,len (rawstring)-InStr (1, rawstring, Sepchar))
Else
Valuesepr = rawstring
End If
End Function
Public Function Getmac (ByVal IP As String) as String
Try
Dim Dirresults as String
Dim psi as System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo ()
Dim p
Asp.net| Client
Using System.Text.RegularExpressions;Using System.Diagnostics;public class Test{Public test{}public static string Getcustomermac (String IP)//para IP is the client ' s IP{String Dirresults= "";ProcessStartInfo psi = new ProcessStartInfo ();Process proc = new process ();Psi. FileName = "nbtstat";Psi. Redirectstandardinput = false;
1. Start the child process, do not wait for the child process to end
private void simpleRun_Click(object sender, System.EventArgs e) { System.Diagnostics.Process.Start(@"C:\listfiles.bat"); } 2. Start the subprocess, wait for the child process to finish, and get the output
1private void Runsyncandgetresults_click (object sender, System.EventArgs e) 2{ 3 System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo (@ "C:\listf
Using System. Text. RegularExpressions;Using System. Diagnostics;Public class test{Public test{}Public static string GetCustomerMac (string IP) // para IP is the client's IP{String dirResults = "";ProcessStartInfo psi = new ProcessStartInfo ();Process proc = new Process ();Psi. FileName = "nbtstat ";Psi. RedirectStandardInput = false;
. NET does not specifically handle FTP classes, we can do the basic operation by invoking the FTP.EXE of the system itself or by invoking the Wininet.dll in the Win32 API. Hope that the following code for everyone.
Method One: Use Ftp.exe to invoke it through the process class.
Imports System.Diagnostics
...
Public Sub getfilebycallftp ()
' Defines the startup information for the processstartinfo,process.
Dim psi as New ProcessStartInfo
The ' Ftp.exe
there are many ways to obtain a MAC address from an IP address on the Internet. However, due to the relationship between routers, you can only obtain the MAC address of an IP address in the same network segment, later, I learned a doscommand "NBTSTAT". This command can be used to obtain the MAC from different network segments. However, I have tested that some addresses cannot be obtained, as if I had enabled the firewall, later, I found a piece of Code . The principle is to obtain the returned
Google Talk
And msn
Other im
How to connect tools With jabber transport server, googletalk can easily communicate with other IM tools. Jabber transport Server is a gateway that can convert one Im protocol to another. Googletalk allows us to send information to jabber transport, but does not support user registration in jabber transport. Therefore, we need a Jabber Client that supports Google Talk to complete user registration in jabber transport. PSI
Using System. Text. RegularExpressions;Using System. Diagnostics;Public class test{Public test{}Public static string GetCustomerMac (string IP) // para IP is the client's IP{String dirResults = "";ProcessStartInfo psi = new ProcessStartInfo ();Process proc = new Process ();Psi. FileName = "nbtstat ";Psi. RedirectStandardInput = false;
This article introduced the ASP.net to obtain the client Nic Mac The small example, the need friend may refer to the
copy code code as follows:
using System.Text.RegularExpressions; using System.Diagnostics; public class Test { Public Test {} public static string Getcustomermac (String IP)//para IP is the clients IP { string dirresults= ""; ProcessStartInfo psi = new ProcessStartInfo (); Process proc = new process ();
Copy Code code as follows:
Using System.Text.RegularExpressions;
Using System.Diagnostics;
public class Test
{
Public test
{}
public static string Getcustomermac (String IP)//para IP is the clients IP
{
String Dirresults= "";
ProcessStartInfo psi = new ProcessStartInfo ();
Process proc = new process ();
Psi. FileName = "nbtstat";
Psi. Redirectsta
Let's start with the following:
First, write a simple foreground code:
Copy Code code as follows:
Again to write a background code, remarks have been said more clearly, here is not much to say!
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Collections;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.
nbtstat command through a background process
Benefits: No additional development components, no client platform limitationsDisadvantages: Limited By the network scope, the success rate is low, the speed is slow.
The principle of implementation: through the nbtstat-a IP command to the other computer's information output pipeline, and then capture the contents of the pipeline output, and then through the regular expression of the Mac filter out.
The C # code is as follows:Using System;Using Syste
found.Example two: Periods with bank transactionsGeneral credit card business experience tells us that the longer the customer and bank transactions, the probability of future default will be lower, the comparison with the bank during the period of grouping and default rate of the trend map found that the development of the sample "with the bank", and the default rate does not have any significant trend, and business experience is inconsistent, said " During the transaction with the bank "is no
Mathematical formulas cannot be separated from Greek letters. The following lists the control commands for generating Greek letters in LaTex:
\ Alpha generates alpha; \ beta generates beta; \ gamma generates gamma; \ delta generates delta; \ epsilon generates ε; \ ε generates |; \ eta generates the character eta; \ theta generates the character 9; \ iota generates the character escape t; \ kappa generates the character kappa; \ 1amta generates the character λ; \ mu generates the character μ; \ x
using system; using system. collections. generic; using system. LINQ; using system. text; using system. diagnostics; namespace consoleapplication3 {class program {static void main (string [] ARGs) {processstartinfo psi = new processstartinfo ("cmd.exe"); PSI. createnowindow = true; PSI. redirectstandardoutput = true; PSI
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.