Skip to content

Instantly share code, notes, and snippets.

View isdaviddong's full-sized avatar

David Tung isdaviddong

View GitHub Profile
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script>
function Auth() {
var URL = 'https://notify-bot.line.me/oauth/authorize?';
URL += 'response_type=code';
URL += '&client_id=你的Client_id';
URL += '&redirect_uri=http://localhost:5467/index.html';
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script>
function Auth() {
var URL = 'https://access.line.me/dialog/oauth/weblogin?';
URL += 'response_type=code';
URL += '&client_id=你的ChannelID';
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using isRock.Framework.PageMethods;
namespace WebApplication16
{
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication16._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>asp.net WebForms SPA Vue Binding </title>
<script src="Scripts/jquery-1.9.1.min.js"></script>
<script src="Scripts/vue.min.js"></script>
<script src="Scripts/isRockFx.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>asp.net WebAPI SPA with Vue.js Binding </title>
<script src="Scripts/jquery-1.9.1.min.js"></script>
<script src="Scripts/vue.min.js"></script>
<script src="Scripts/isRockFx.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script>
var vd_StudentInfo;
public ExecuteCommandDefaultResult<List<StudentInfo>> GetData()
{
//準備假資料
List<StudentInfo> returnData = new List<StudentInfo>();
returnData.Add(new StudentInfo { StudentName = "王曉明", Height = 170, Weight = 72 });
returnData.Add(new StudentInfo { StudentName = "張曉春", Height = 180, Weight = 75 });
returnData.Add(new StudentInfo { StudentName = "田豐盛", Height = 175, Weight = 60 });
returnData.Add(new StudentInfo { StudentName = "楊明山", Height = 165, Weight = 90 });
returnData.Add(new StudentInfo { StudentName = "令狐衝", Height = 172, Weight = 80 });
//計算BMI
<tbody>
<tr v-for="item in items">
<td>
<button class="btn btn-outline btn-primary btn-xs" v-on:click="edit(item)">編輯</button>
<button class="btn btn-outline btn-primary btn-xs" v-on:click="remove(item)">刪除</button>
</td>
<td>
<span>{{item.StudentName}}</span>
</td>
<td>
<script>
var vd_StudentInfo; //儲存資料
var vm_StudentInfo; //Vue instance
//設定資料繫結
function SetBinding() {
//create vue instance
vm_StudentInfo = new Vue(
{
el: '#tableBody',
/// <summary>
/// 刪除一筆資料
/// </summary>
/// <param name=""></param>
/// <returns></returns>
public ExecuteCommandDefaultResult<List<StudentInfo>> Remove(Guid guid)
{
//找到資料
var ret = from c in StudentInfomation
where c.guid == guid
<html>
<head>
<title>AspNetWithVueBinding </title>
<script src="Scripts/jquery-1.9.1.min.js"></script>
<script src="Scripts/vue.min.js"></script>
<script src="Scripts/isRockFx.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/utility.js"></script>
<script>
Vue.config.debug = true; //vue debug mode