對於網頁設計有興趣的朋友
可以到網站去下載css樣式表回去做參考
http://www.freecsstemplates.org/css-templates/
<appSettings> <add key="webpages:Version" value="1.0.0.0"/> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings>
<Reference Include="System.Web.WebPages"/>
<Reference Include="System.Web.Helpers" />
<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>
<Reference Include="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>@ViewBag.Title</title> | |
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> | |
<script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script> | |
<script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script> | |
</head> | |
<body> | |
@RenderBody() | |
</body> | |
</html> |
public class AjaxController : Controller | |
{ | |
// | |
// GET: /Ajax/ | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
[HttpPost] | |
public PartialViewResult Index(FormCollection data) | |
{ | |
List<string> result = new List<string>(); | |
string input = data["MyInput"].Split(new string { "\n" }, StringSplitOptions.None); | |
result.Add("<b><i><u>I said</u></i></b>:<br />"); | |
foreach (var line in input) | |
result.Add(line + "<br />"); | |
return PartialView("_IndexPartial", result); | |
} | |
} |
@{ | |
ViewBag.Title = "Index"; | |
} | |
<h2>Hello!</h2> | |
<p>Please tell me something...</p> | |
@using (Ajax.BeginForm(new AjaxOptions { UpdateTargetId = "targetDiv" })) | |
{ | |
@Html.TextArea("MyInput", new { @style = "width:100%;height:200px;" }); | |
<br /><br /> | |
<input type="submit" value="What did you say?" /> | |
} | |
<div id="targetDiv" style="width:100%;margin-top:20px;padding:10px;"> | |
... | |
</div> |
@if (Model != null) | |
{ | |
foreach (string line in (Model as List<string>)) | |
{ | |
@Html.Raw(line) | |
} | |
} |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
[HttpPost] | |
public ActionResult Index(Models.ValueAddModel Model) | |
{ | |
if (this.ModelState.IsValid) | |
{ | |
TempData["result"] = Model.Add(); | |
return RedirectToAction("PostData"); | |
} | |
else | |
return View(); | |
} |
string ClientconnString = @"Data Source=D:\DB\App.sdf;Encrypt Database=True;Password=@APpsn_985@;Persist Security Info=False;Max Database Size = 4091"; | |
SqlCeConnection conn = new SqlCeConnection(ClientconnString); | |
conn.Open(); | |
SqlCeCommand CeCmd = conn.CreateCommand(); | |
CeCmd.CommandText = @"UPDATE F_finger SET updatedt=@updatedt WHERE p_empno='AK6277'"; | |
CeCmd.Parameters.Add("@updatedt", SqlDbType.DateTime, 30); | |
CeCmd.Parameters["@updatedt"].Value = DateTime.Now; | |
int rows = CeCmd.ExecuteNonQuery(); | |
conn.Close(); |
▲SSL主要是運作在應用層與傳輸層間。 |
▲SSL Handshake的運作流程。 |
▲SSL連線四個步驟。 |
▲x509憑證架構。 |
▲查看憑證內容。 |
alloc
|
創建對象,分配空間
|
init (initWithNibName)
|
初始化物件,初始化資料
|
loadView
|
從nib載入視圖 ,通常這一步不需要去干涉。除非你沒有使用xib檔創建視圖
|
viewDidLoad
|
載入完成,可以進行自訂資料以及動態創建其他控制項
|
viewWillAppear
|
視圖將出現在螢幕之前,馬上這個視圖就會被展現在螢幕上了
|
viewDidAppear
|
視圖已在螢幕上渲染完成
|
viewWillDisappear
|
視圖將被從螢幕上移除之前執行
|
viewDidDisappear
|
視圖已經被從螢幕上移除,使用者看不到這個視圖了
|
dealloc
|
視圖被銷毀,此處需要對你在init和viewDidLoad中創建的物件進行釋放
|