ASP.NET 웹 페이지 - 도우미
웹 도우미는 웹 개발 및 일반적인 프로그래밍 작업을 크게 단순화합니다.
ASP.NET 도우미
ASP.NET 도우미는 한 줄의 Razor 코드로 액세스할 수 있는 구성 요소입니다.
.cshtml 파일로 저장된 Razor 구문을 사용하여 고유한 도우미를 빌드하거나 기본 제공 ASP.NET 도우미를 사용할 수 있습니다.
이 자습서의 다음 장에서 Razor 도우미를 사용하는 방법을 배웁니다.
다음은 몇 가지 유용한 Razor 도우미에 대한 간략한 설명입니다.
WebGrid 도우미
WebGrid 도우미는 데이터 표시 방법을 단순화합니다.
- 데이터를 표시하도록 HTML 테이블을 자동으로 설정합니다.
- 서식을 위한 다양한 옵션 지원
- 데이터를 통한 페이징(첫 번째, 다음, 이전, 마지막) 지원
- 열 머리글을 클릭하여 정렬 지원
차트 도우미
"차트 도우미"는 다양한 서식 옵션과 레이블을 사용하여 다양한 유형의 차트 이미지를 표시할 수 있습니다.
차트 도우미는 배열, 데이터베이스 또는 파일의 데이터를 표시할 수 있습니다.
웹메일 도우미
WebMail 도우미는 SMTP(Simple Mail Transfer Protocol)를 사용하여 이메일 메시지를 보내는 기능을 제공합니다.
WebImage 도우미
WebImage 도우미는 웹 페이지에서 이미지를 관리하는 기능을 제공합니다.
키워드: 뒤집기, 회전, 크기 조정, 워터마크.
타사 도우미
Razor를 사용하면 기본 제공 또는 타사 도우미를 활용하여 전자 메일, 데이터베이스, 멀티미디어 및 소셜 네트워크의 사용은 물론 탐색 및 웹 보안과 같은 기타 여러 문제를 단순화할 수 있습니다.
애널리틱스(구글)
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. |
빙
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. |
파일 업로드
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. |
제이슨
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. |
링크쉐어
Helper | Description |
---|---|
LinkShare.GetHtml(pageTitle [,
pageLinkBack] [, twitterUserName] [, additionalTweetText] [, linkSites]) | Renders social networking links using the specified title and optional URL. |
모델 상태
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. |
개체 정보
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. |
서버 정보
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. |
웹캐시
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. |
웹이미지
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. |