ASP.NET वेब पेज - हेल्पर्स
वेब हेल्पर्स वेब विकास और सामान्य प्रोग्रामिंग कार्यों को बहुत सरल करते हैं।
ASP.NET हेल्पर्स
ASP.NET हेल्पर्स ऐसे घटक हैं जिन्हें रेजर कोड की सिंगल लाइन द्वारा एक्सेस किया जा सकता है।
आप .cshtml फ़ाइलों के रूप में संग्रहीत रेजर सिंटैक्स का उपयोग करके अपने स्वयं के सहायक बना सकते हैं, या अंतर्निहित ASP.NET सहायकों का उपयोग कर सकते हैं।
आप इस ट्यूटोरियल के अगले अध्यायों में रेजर हेल्पर्स का उपयोग करना सीखेंगे।
नीचे कुछ उपयोगी रेजर हेल्पर्स का संक्षिप्त विवरण दिया गया है:
वेबग्रिड हेल्पर
वेबग्रिड सहायक डेटा प्रदर्शित करने के तरीके को सरल करता है:
- डेटा प्रदर्शित करने के लिए स्वचालित रूप से एक HTML तालिका सेट करता है
- स्वरूपण के लिए विभिन्न विकल्पों का समर्थन करता है
- डेटा के माध्यम से पेजिंग (प्रथम, अगला, पिछला, अंतिम) का समर्थन करता है
- स्तंभ शीर्षकों पर क्लिक करके छँटाई का समर्थन करता है
चार्ट हेल्पर
"चार्ट हेल्पर" कई स्वरूपण विकल्पों और लेबल के साथ विभिन्न प्रकार की चार्ट छवियों को प्रदर्शित कर सकता है।
चार्ट सहायक सरणियों से, डेटाबेस से, या फ़ाइलों से डेटा प्रदर्शित कर सकता है।
वेबमेल हेल्पर
वेबमेल सहायक एसएमटीपी (सिंपल मेल ट्रांसफर प्रोटोकॉल) का उपयोग करके ईमेल संदेश भेजने के लिए कार्य प्रदान करता है।
वेबइमेज हेल्पर
WebImage सहायक वेब पेज में छवियों को प्रबंधित करने के लिए कार्यक्षमता प्रदान करता है।
कीवर्ड: फ्लिप करें, घुमाएं, आकार बदलें, वॉटरमार्क करें।
थर्ड पार्टी हेल्पर्स
रेजर के साथ आप ईमेल, डेटाबेस, मल्टीमीडिया और सोशल नेटवर्क के साथ-साथ नेविगेशन और वेब सुरक्षा जैसे कई अन्य मुद्दों के उपयोग को आसान बनाने के लिए बिल्ट-इन या थर्ड पार्टी हेल्पर्स का लाभ उठा सकते हैं।
एनालिटिक्स (गूगल)
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. |