Create an empty Project project1
Add a WebForm1
Write the following code:
Private void Page_Load (object sender, System. EventArgs e)
{
If (Session ["UserID"]! = Null)
{
This. Response. Write (Session ["UserName"]. ToString ());
}
Else
{
This. Response. Write ("the user name or password you entered is incorrect! ");
}
}
Click the project name and add a new webservie Login. asmx
The code file is as follows:
Using System;
Using System. Collections;
Using System. ComponentModel;
Using System. Data;
Using System. Diagnostics;
Using System. Web;
Using System. Web. Services;
Namespace WorkFlow
{
/// <Summary>
/// Login summary.
/// </Summary>
Public class Login: System. Web. Services. WebService
{
WorkFlowWebUI. PortalLogin. FrameworkService loginService = new WorkFlowWebUI. PortalLogin. FrameworkService ();
Public Login ()
{
// CODEGEN: This call is required by the ASP. NET Web service designer.
InitializeComponent ();
}
# Region Component Designer generated code
// Required by the Web service designer
Private IContainer components = null;
/// <Summary>
/// The designer supports the required methods-do not use the code editor to modify
/// Content of this method.
/// </Summary>
Private void InitializeComponent ()
{
}
/// <Summary>
/// Clear all resources in use.
/// </Summary>
Protected override void Dispose (bool disposing)
{
If (disposing & components! = Null)
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service