This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Page_Load(object sender, EventArgs e) | |
{ | |
HttpPostedFile file = null; | |
if (Request.Files.Count > 0) | |
{ | |
//找到檔案 | |
file = Request.Files[0]; | |
//儲存 | |
var filePath = Server.MapPath(System.IO.Path.GetFileName(file.FileName)); | |
file.SaveAs(filePath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LineChatController : ApiController | |
{ | |
[HttpPost] | |
public IHttpActionResult POST() | |
{ | |
string ChannelAccessToken = "DETqsnH04xR7Xv...(請輸入你自己的ChannelAccessToken)...1cDnyilFU="; | |
try | |
{ | |
//取得 http Post RawData(should be JSON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LineChatController : ApiController | |
{ | |
[HttpPost] | |
public IHttpActionResult POST() | |
{ | |
string ChannelAccessToken = "DETqsnH04xR7Xv...(請輸入你自己的ChannelAccessToken)...1cDnyilFU="; | |
try | |
{ | |
//取得 http Post RawData(should be JSON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleController : ApiController | |
{ | |
[Route("api/Example/{MethodName}")] | |
[HttpPost] | |
public IHttpActionResult ExecuteMethod(string MethodName) | |
{ | |
try | |
{ | |
//AssemblyLauncher | |
AssemblyLauncher assemblyLauncher = new AssemblyLauncher(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
<script src="Scripts/jquery-1.9.1.min.js"></script> | |
<link href="Content/bootstrap.min.css" rel="stylesheet" /> | |
<script src="Scripts/isRockFx.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using isRock.Framework; | |
using isRock.Framework.WebAPI; | |
namespace WebApplication15.BO | |
{ | |
public class Health : BusinessLogicBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
<script src="Scripts/jquery-1.9.1.min.js"></script> | |
<link href="Content/bootstrap.min.css" rel="stylesheet" /> | |
<script src="Scripts/isRockFx.js"></script> | |
<script> | |
$(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string Token = "你自己的LineBot Channel Access Token"; | |
string toUserId = "傳送對象的UserId"; | |
//建立LineBot物件實體 | |
isRock.LineBot.Bot LineBot = new isRock.LineBot.Bot(Token); | |
//發送圖片訊息 | |
LineBot.PushMessage(toUserId, | |
new Uri("https://圖片位置/22-124303-d8b2c4de-9a8c-48da-83f1-7c0d36de3ab6.png")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebFormsSPA._default" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title></title> | |
<script src="Scripts/jquery-1.9.1.min.js"></script> | |
<link href="Content/bootstrap.min.css" rel="stylesheet" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class _default : System.Web.UI.Page | |
{ | |
/// <summary> | |
/// 計算BMI | |
/// </summary> | |
/// <param name="height">身高</param> | |
/// <param name="weight">體重</param> | |
/// <returns></returns> | |
[System.Web.Services.WebMethod(enableSession: true)] | |
public static PageMethodDefaultResult<float> BMI(float height, float weight) |
OlderNewer