ASPチュートリアル

ASPホーム

WPチュートリアル

Webページの紹介 WebPages Razor Webページのレイアウト Webページフォルダ WebPages Global Webページフォーム Webページオブジェクト Webページファイル Webページデータベース Webページヘルパー WebPages WebGrid Webページチャート Webページの電子メール Webページのセキュリティ Webページの公開 Webページの例 Webページクラス

ASP.NET Razor

かみそりのイントロ かみそりの構文 Razor C#変数 Razor C#ループ Razor C#ロジック RazorVB変数 かみそりVBループ RazorVBロジック

ASPクラシック

ASPイントロ ASP構文 ASP変数 ASP手順 ASP条件文 ASPループ ASPフォーム ASPCookie ASPセッション ASPアプリケーション ASP #include ASP Global.asa ASP AJAX ASPメール ASPの例

ASPリファレンス

ASPVB関数 ASPVBキーワード ASP応答 ASPリクエスト ASPアプリケーション ASPセッション ASPサーバー ASPエラー ASPファイルシステム ASP TextStream ASPドライブ ASPファイル ASPフォルダー ASP辞書 ASP AdRotator ASP BrowserCap ASPコンテンツリンク ASPコンテンツローテーター ASPクイック参照

ADOチュートリアル

ADOイントロ ADOコネクト ADOレコードセット ADOディスプレイ ADOクエリ ADOソート ADO追加 ADOアップデート ADO削除 ADO Demo ADOスピードアップ

ADOオブジェクト

ADOコマンド ADO接続 ADOエラー ADOフィールド ADOパラメータ ADOプロパティ ADOレコード ADOレコードセット ADOストリーム ADOデータ型

ASP.NETWebページ-ヘルパー


Webヘルパーは、Web開発と一般的なプログラミングタスクを大幅に簡素化します。


ASP.NETヘルパー

ASP.NETヘルパーは、1行のRazorコードでアクセスできるコンポーネントです。

.cshtmlファイルとして保存されているRazor構文を使用して独自のヘルパーを作成することも、組み込みのASP.NETヘルパーを使用することもできます。

このチュートリアルの次の章では、Razorヘルパーの使用方法を学習します。

以下は、いくつかの便利なRazorヘルパーの簡単な説明です。


WebGridヘルパー

WebGridヘルパーは、データを表示する方法を簡素化します。

  • データを表示するためのHTMLテーブルを自動的に設定します
  • フォーマットのさまざまなオプションをサポート
  • データを介したページング(最初、次、前、最後)をサポート
  • 列見出しをクリックして並べ替えをサポート

チャートヘルパー

「チャートヘルパー」は、多くのフォーマットオプションとラベルを使用して、さまざまなタイプのチャート画像を表示できます。

チャート チャート

チャートヘルパーは、配列、データベース、またはファイルからのデータを表示できます。


Webメールヘルパー

WebMailヘルパーは、SMTP(Simple Mail Transfer Protocol)を使用して電子メールメッセージを送信するための機能を提供します。


WebImageヘルパー

WebImageヘルパーは、Webページ内の画像を管理する機能を提供します。

キーワード:反転、回転、サイズ変更、透かし。



サードパーティのヘルパー

Razorを使用すると、組み込みまたはサードパーティのヘルパーを利用して、電子メール、データベース、マルチメディア、ソーシャルネットワーク、およびナビゲーションやWebセキュリティなどの他の多くの問題の使用を簡素化できます。


アナリティクス(Google)

Helper Description
Analytics.GetGoogleHtml(webPropertyId) Renders the Google Analytics JavaScript code for the specified ID.
Analytics.GetStatCounterHtml(project, security)Renders the StatCounter Analytics JavaScript code for the specified project.
Analytics.GetYahooHtml(account) Renders the Yahoo Analytics JavaScript code for the specified account.

Bing

Helper Description
Bing.SearchBox([boxWidth]) Passes a search to Bing. To specify the site to search and a title for the search box, you can set the Bing.SiteUrl and Bing.SiteTitle properties. Normally you set these properties in the _AppStart page.
Bing.AdvancedSearchBox([, boxWidth] [, resultWidth] [, resultHeight]
  [, themeColor] [, locale]
)
Displays Bing search results in the page with optional formatting. To specify the site to search and a title for the search box, you can set the Bing.SiteUrl and Bing.SiteTitle properties. Normally you set these properties in the _AppStart page.

暗号

Helper Description
Crypto.Hash(string [, algorithm])
Crypto.Hash(bytes [, algorithm])
Returns a hash for the specified data. The default algorithm is sha256.

フェイスブック

Helper Description
Facebook.LikeButton(href [, buttonLayout] [, showFaces] [, width] [, height]
[, action] [, font] [, colorScheme] [, refLabel]
)
Lets Facebook users make a connection to pages.

FileUpload

Helper Description
FileUpload.GetHtml([initialNumberOfFiles] [, allowMoreFilesToBeAdded]
  [
, includeFormTag] [, addText] [, uploadText])
Renders UI for uploading files.

ゲーマーカード

Helper Description
GamerCard.GetHtml(gamerTag) Renders the specified Xbox gamer tag.

Gravatarオブジェクトリファレンス

Helper Description
Gravatar.GetHtml(email [, imageSize] [, defaultImage] [, rating]
  [, imageExtension] [, attributes]
)
Renders the Gravatar image for the specified email address.

Json

Helper Description
Json.Encode(object) Converts a data object to a string in the JavaScript Object Notation (JSON) format.
Json.Decode(string) Converts a JSON-encoded input string to a data object that you can iterate over or insert into a database.

LinkShare

Helper Description
LinkShare.GetHtml(pageTitle [, pageLinkBack] [, twitterUserName]
  [, additionalTweetText] [, linkSites]
)
Renders social networking links using the specified title and optional URL.

ModelState

Helper Description
ModelStateDictionary.AddError(key, errorMessage)Associates an error message with a form field. Use the ModelState helper to access this member.
ModelStateDictionary.AddFormError(errorMessage) Associates an error message with a form. Use the ModelState helper to access this member.
ModelStateDictionary.IsValid Returns true if there are no validation errors. Use the ModelState helper to access this member.

ObjectInfo

Helper Description
ObjectInfo.Print(value [, depth] [, enumerationLength])Renders the properties and values of an object and any child objects.

要約

Helper Description
Recaptcha.GetHtml([, publicKey] [, theme] [, language] [, tabIndex]) Renders the reCAPTCHA verification test.
ReCaptcha.PublicKey
ReCaptcha.PrivateKey
Sets public and private keys for the reCAPTCHA service. Normally you set these properties in the _AppStart page.
ReCaptcha.Validate([, privateKey]) Returns the result of the reCAPTCHA test.

ServerInfo

Helper Description
ServerInfo.GetHtml()Renders status information about ASP.NET Web Pages.

ツイッター

Helper Description
Twitter.Profile(twitterUserName) Renders a Twitter stream for the specified user.
Twitter.Search(searchQuery) Renders a Twitter stream for the specified search text.

ビデオ

Helper Description
Video.Flash(filename [, width, height]) Renders a Flash video player for the specified file with optional width and height.
Video.MediaPlayer(filename [, width, height])Renders a Windows Media player for the specified file with optional width and height.
Video.Silverlight(filename, width, height)Renders a Silverlight player for the specified .xap file with required width and height.

WebCache

Helper Description
WebCache.Get(key) Returns the object specified by key, or null if the object is not found.
WebCache.Remove(key) Removes the object specified by key from the cache.
WebCache.Set(key, value [, minutesToCache] [, slidingExpiration]) Puts value into the cache under the name specified by key.

WebImage

Helper Description
WebImage(path)Loads an image from the specified path.
WebImage.AddImagesWatermark(image) Adds the specified image as a watermark.
WebImage.AddTextWatermark(text) Adds the specified text to the image.
WebImage.FlipHorizontal()
WebImage.FlipVertical()
Flips the image horizontally or vertically.
WebImage.GetImageFromRequest() Loads an image when an image is posted to a page during a file upload.
WebImage.Resize(width, height) Resizes the image.
WebImage.RotateLeft()
WebImage.RotateRight()
Rotates the image to the left or the right.
WebImage.Save(path [, imageFormat]) Saves the image to the specified path.