using System.Collections.Generic;
Using System. Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
The namespace HoverTreeTool. HvtInfo. KeleyiClient
{
Public partial class _Default: System. Web. UI. Page
{
Protected void Page_Load (object sender, EventArgs e)
{
String userAgent=Request. UserAgent==null? "No" : Request. UserAgent;
if (! IsPostBack)
{
String UserIP=Page. Request. UserHostAddress;
String TMPSTR=UserIP. Substring (10, (UserIP. Length - 10));
String UserName;
Response. Write (UserIP);
Response. Write (TMPSTR);
If (int. Parse (TMPSTR) & lt; 10)
{TMPSTR="0" + TMPSTR;
The UserName="VE_ + TMPSTR";
}
The else
{
The UserName="VE_ + TMPSTR";
}
Response. Write (UserName);
String tmppath;
Tmppath="E: \ \ test \ \ WebSite1 \ \ user \ " + UserName;
Response. Write (tmppath);
Directoryinfo tmpusername=new Directoryinfo (tmppath);
Can't find the type or namespace name "directoryinfo (lack of a using directive or assembly references?)
CodePudding user response:
Pay attention to the case, this kind of mistake on the mouse when also can have correct prompt,CodePudding user response: