Skip to content

Instantly share code, notes, and snippets.

@bestpika
Last active August 23, 2018 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bestpika/1952b9048ba2d85717d544a78cc264ec to your computer and use it in GitHub Desktop.
Save bestpika/1952b9048ba2d85717d544a78cc264ec to your computer and use it in GitHub Desktop.
#webform #vue

ASP.NET Webform with Vue

套件

使用 WebMethod

[System.Web.Services.WebMethod(enableSession: true)]
public static PageMethodDefaultResult<T> funcName(T varName)
{
    // do sth...
}

Web API

Session

protected void Application_BeginRequest(object sender, EventArgs e)
{
    HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment