Razor Cheat Sheet

Posted on  by 



Razor is a markup syntax that lets you embed server-based code (Visual Basic and C#) into web pages. Server-based code can create dynamic web content on the fly, while a web page is written to the browser. When a web page is called, the server executes the server-based code inside the page before it returns the page to the browser.

  1. C# Syntax Cheat Sheet
  2. Apple Eft Hack

home | about | contact | enquiry | warranty | sign in
SINGLE PHASE INVERTER AC/DC TIG MACHINES
THREE PHASE INVERTER ARC AND DC TIG MACHINES
THREE PHASE INVERTER AC/DC TIG MACHINES
THREE PHASE INVERTER MULTISYSTEM MACHINES
WELDING HELMETS
TORCHES & REGULATORS
VIPER
PREVIOUS PRODUCT


The RAZORCUT45 is an inverter-based Plasma cutting machine produced using the latest in IGBT technology. This
machine is reliable, robust and stacked with features that you can expect from a quality Plasma Cutter. The RAZORCUT45 produces a high temperature plasma stream providing effortless cutting of all electrically conductive materials including steel, cast Iron,
stainless steel, copper, aluminium brass etc . The RAZORCUT45 is equipped with a high quality SureGrip TRF-45-6-CC1 Plasma torch with Euro connection,developed specifically to enhance and improve the cut quality of the RAZORCUT45 machine. Connection of the TRF-45-6-CC1 Plasma torch provides effortless starting of the cut with powerful, fast and accurate cutting capability, additional is the benefit of longer life cycle consumable electrodes and cutting tips. The RAZORCUT45 is an exceptional machine that is suitable for a wide range of applications including sheet metal fabrication, light industrial use, site work, automotive, ducting work, repair and
maintenance services. The RAZORCUT45 is packaged with a tough SureGrip TRF-45-6-CC1 Plasma torch, earth lead and air
regulator. The RAZORCUT45 gives you the best of both worlds great portability, with the power to get the job done. Built to our
specification and manufactured in compliance to CAN/CSA E60974-1 & ANSI/IEC 60974-1

Part NumberJRWPC45LT
Power Supply / Phase (V-Ph)230v - 1 +/- 15%
Rated Input Power (KVA)5.50
Rated Output96 V
Air flow Pressure (MPA)0.5 (75 psi)
Air Flow Rate (CFM)6.70
Cutting Thickness (inches)5/8
Duty Cycle 104ºF30% @ 45Amps
Protection ClassIP21S
Size (inches)18.1' x 6.69' x 12.99'
Weight (pounds)20.2
Warranty3 years machine only

PRODUCT SUPPORT

RAZORCUT 45 Info Sheet (0.24 Mb)
RAZORCUT 45 Manual (2.70 Mb)
Viper Cut 30 Manual (6.14 Mb)

PACKAGE CONTENTS

RAZORCUT45 Machine
TRF-45-6-CC1 x 19ft Plasma Torch
Earth Lead 5/8' x 13ft


PART NUMBER

JRWPC45LT

RELATED PRODUCTS

� JASIC Technologies America Inc 25503 74th Ave S,Kent WA 98032 U.S.A 2021 | privacy policy | contact us | about | home | sign in

Web site developed and maintained by WichIT Pty Ltd ABN 17 122 819 774

  1. Getting Started with Razor Pages. Razor Pages are physical.cshtml files and to create Razor Page you need to create a Pages folder inside your project.This is by convention but if you want to create a folder with some other name then you have to tell ASP.NET where the Razor Pages are located.
  2. DRAFT: Microsoft Razor Cheat Sheet. Microsoft ASP.NET MVC Razor View Engine Cheat Sheet. Html, razor, mvc, asp-net.
  3. ASP.NET Razor Cheat Sheet. GitHub Gist: instantly share code, notes, and snippets.
  4. ASP.NET Razor Cheatsheet. Contribute to jwill9999/ASP.NET-Razor-Cheatsheet development by creating an account on GitHub.
-->

by Tom FitzMacken

This page contains a list with brief examples of the most commonly used objects, properties, and methods for programming ASP.NET Web Pages with Razor syntax.

Descriptions marked with '(v2)' were introduced in ASP.NET Web Pages version 2.

For API reference documentation, see the ASP.NET Web Pages Reference Documentation on MSDN.

Software versions

  • ASP.NET Web Pages (Razor) 3

This tutorial also works with ASP.NET Web Pages 2 and ASP.NET Web Pages 1.0 (except for features marked v2).

This page contains reference information for the following:

Sheet

Classes

AppState[key], AppState[index],App

Contains data that can be shared by any pages in the application. You can use the dynamic App property to access the same data, as in the following example:

AsBool(), AsBool(true|false)

Converts a string value to a Boolean value (true/false). Returns false or the specified value if the string does not represent true/false.

AsDateTime(), AsDateTime(value)

Converts a string value to date/time. Returns DateTime.MinValue or the specified value if the string does not represent a date/time.

AsDecimal(), AsDecimal(value)

Converts a string value to a decimal value. Returns 0.0 or the specified value if the string does not represent a decimal value.

AsFloat(), AsFloat(value)

Converts a string value to a float. Returns 0.0 or the specified value if the string does not represent a decimal value.

AsInt(), AsInt(value)

Converts a string value to an integer. Returns 0 or the specified value if the string does not represent an integer.

Href(path [, param1 [, param2]])

Creates a browser-compatible URL from a local file path, with optional additional path parts.

Html.Raw(value)

Renders value as HTML markup instead of rendering it as HTML-encoded output.

IsBool(), IsDateTime(), IsDecimal(), IsFloat(), IsInt()

Returns true if the value can be converted from a string to the specified type.

IsEmpty()

Returns true if the object or variable has no value.

IsPost

Returns true if the request is a POST. (Initial requests are usually a GET.)

Blazor cheat sheet

Layout

Specifies the path of a layout page to apply to this page.

PageData[key], PageData[index],Page

Contains data shared between the page, layout pages, and partial pages in the current request. You can use the dynamic Page property to access the same data, as in the following example:

RenderBody()

(Layout pages) Renders the content of a content page that is not in any named sections.

RenderPage(path, values)

RenderPage(path[,param1 [, param2]])

Renders a content page using the specified path and optional extra data. You can get the values of the extra parameters from PageData by position (example 1) or key (example 2).

RenderSection(sectionName [, required = true|false])

(Layout pages) Renders a content section that has a name. Set required to false to make a section optional.

Request.Cookies[key]

Gets or sets the value of an HTTP cookie.

Request.Files[key]

Gets the files that were uploaded in the current request.

Request.Form[key]

Gets data that was posted in a form (as strings). Request[key] checks both the Request.Form and the Request.QueryString collections.

Request.QueryString[key]

Gets data that was specified in the URL query string. Request[key] checks both the Request.Form and the Request.QueryString collections.

Request.Unvalidated(key)

Request.Unvalidated().QueryString|Form|Cookies|Headers[key]

Selectively disables request validation for a form element, query-string value, cookie, or header value. Request validation is enabled by default and prevents users from posting markup or other potentially dangerous content.

Response.AddHeader(name, value)

Adds an HTTP server header to the response.

Response.OutputCache(seconds [, sliding] [, varyByParams])

Caches the page output for a specified time. Optionally set sliding to reset the timeout on each page access and varyByParams to cache different versions of the page for each different query string in the page request.

Response.Redirect(path)

Redirects the browser request to a new location.

Response.SetStatus(httpStatusCode)

Sets the HTTP status code sent to the browser.

Response.WriteBinary(data [, mimetype])

Writes the contents of data to the response with an optional MIME type.

Response.WriteFile(file)

Writes the contents of a file to the response.

@section(sectionName) {content }

(Layout pages) Defines a content section that has a name.

Server.HtmlDecode(htmlText)

Decodes a string that is HTML encoded.

Server.HtmlEncode(text)

Encodes a string for rendering in HTML markup.

Server.MapPath(virtualPath)

Returns the server physical path for the specified virtual path.

Server.UrlDecode(urlText)

Decodes text from a URL.

Server.UrlEncode(text)

Encodes text to put in a URL.

Session[key]

Gets or sets a value that exists until the user closes the browser.

ToString()

Displays a string representation of the object's value.

UrlData[index]

Gets additional data from the URL (for example, /MyPage/ExtraData).

WebSecurity.ChangePassword(userName,currentPassword,newPassword)

Changes the password for the specified user.

WebSecurity.ConfirmAccount(accountConfirmationToken)

Confirms an account using the account confirmation token.

WebSecurity.CreateAccount(userName, password

[, requireConfirmationToken = true|false])

Creates a new user account with the specified user name and password. To require a confirmation token, pass true for requireConfirmationToken.

WebSecurity.CurrentUserId

Gets the integer identifier for the currently logged-in user.

WebSecurity.CurrentUserName

Gets the name for the currently logged-in user.

WebSecurity.GeneratePasswordResetToken(username

[, tokenExpirationInMinutesFromNow])

Generates a password-reset token that can be sent in email to a user so that the user can reset the password.

WebSecurity.GetUserId(userName)

Returns the user ID from the user name.

WebSecurity.IsAuthenticated

Returns true if the current user is logged in.

WebSecurity.IsConfirmed(userName)

Returns true if the user has been confirmed (for example, through a confirmation email).

WebSecurity.IsCurrentUser(userName)

Returns true if the current user's name matches the specified user name.

WebSecurity.Login(userName,password[, persistCookie])

Logs the user in by setting an authentication token in the cookie.

Cheat

WebSecurity.Logout()

Logs the user out by removing the authentication token cookie.

WebSecurity.RequireAuthenticatedUser()

If the user is not authenticated, sets the HTTP status to 401 (Unauthorized).

WebSecurity.RequireRoles(roles)

If the current user is not a member of one of the specified roles, sets the HTTP status to 401 (Unauthorized).

WebSecurity.RequireUser(userId)

WebSecurity.RequireUser(userName)

If the current user is not the user specified by username, sets the HTTP status to 401 (Unauthorized).

WebSecurity.ResetPassword(passwordResetToken,newPassword)

If the password reset token is valid, changes the user's password to the new password.

Data

Database.Execute(SQLstatement [,parameters]

Executes SQLstatement (with optional parameters) such as INSERT, DELETE, or UPDATE and returns a count of affected records.

Database.GetLastInsertId()

Returns the identity column from the most recently inserted row.

Database.Open(filename)

Database.Open(connectionStringName)

Opens either the specified database file or the database specified using a named connection string from the Web.config file.

Database.OpenConnectionString(connectionString)

Opens a database using the connection string. (This contrasts with Database.Open, which uses a connection string name.)

Database.Query(SQLstatement[,parameters])

Queries the database using SQLstatement (optionally passing parameters) and returns the results as a collection.

Database.QuerySingle(SQLstatement [, parameters])

Executes SQLstatement (with optional parameters) and returns a single record.

Database.QueryValue(SQLstatement [, parameters])

Executes SQLstatement (with optional parameters) and returns a single value.

Helpers

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.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.

Chart(width,height [, template] [, templatePath])

Initializes a chart.

Chart.AddLegend([title] [, name])

Adds a legend to a chart.

Razor Cheat Sheet

Chart.AddSeries([name] [, chartType] [, chartArea]

[, axisLabel] [, legend] [, markerStep] [, xValue]
[, xField] [, yValues] [, yFields] [, options])

Adds a series of values to the chart.

Crypto.Hash(string [, algorithm])

Crypto.Hash(bytes [, algorithm])

Returns a hash for the specified data. The default algorithm is sha256.

C# Syntax Cheat Sheet

Facebook.LikeButton(href [, buttonLayout] [, showFaces] [, width] [, height]

[, action] [, font] [, colorScheme] [, refLabel])

Lets Facebook users make a connection to pages.

FileUpload.GetHtml([initialNumberOfFiles] [, allowMoreFilesToBeAdded]

[, includeFormTag] [, addText] [, uploadText])

Renders UI for uploading files.

GamerCard.GetHtml(gamerTag)

Renders the specified Xbox gamer tag.

Gravatar.GetHtml(email [, imageSize] [, defaultImage] [, rating]

[, imageExtension] [, attributes])

Renders the Gravatar image for the specified email address.

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.GetHtml(pageTitle[, pageLinkBack] [, twitterUserName]

[, additionalTweetText] [, linkSites])

Renders social networking links using the specified title and optional URL.

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.Print(value [, depth] [, enumerationLength])

Renders the properties and values of an object and any child objects.

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.GetHtml()

Renders status information about ASP.NET Web Pages.

Twitter.Profile(twitterUserName)

Renders a Twitter stream for the specified user.

Twitter.Search(searchQuery)

Renders a Twitter stream for the specified search text.

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.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.

WebGrid(data)

Creates a new WebGrid object using data from a query.

WebGrid.GetHtml()

Renders markup to display data in an HTML table.

WebGrid.Pager()

Renders a pager for the WebGrid object.

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 an 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.

WebMail.Password

Sets the password for the SMTP server. Normally you set this property in the _AppStart page.

WebMail.Send(to, subject, body [, from] [, cc] [, filesToAttach] [, isBodyHtml]

[, additionalHeaders])

Sends an email message.

WebMail.SmtpServer

Sets the SMTP server name. Normally you set this property in the _AppStart page.

WebMail.UserName

Sets the user name for the SMTP server. Normally you should set this property in the _AppStart page.

Validation

Html.ValidationMessage(field)

(v2) Renders a validation error message for the specified field.

Html.ValidationSummary([message])

(v2) Displays a list of all validation errors.

Validation.Add(field, validationType)

(v2) Registers a user input element for the specified type of validation.

Validation.ClassFor(field)

(v2) Dynamically renders CSS class attributes for client-side validation so that you can format validation error messages. (Requires that you reference the appropriate client-script libraries and that you define CSS classes.)

Validation.For(field)

(v2) Enables client-side validation for the user input field. (Requires that you reference the appropriate client-script libraries.)

Validation.IsValid()

(v2) Returns true if all user input elements that are registred for validation contain valid values.

Apple Eft Hack

Validation.RequireField(field[, errorMessage])

(v2) Specifies that users must provide a value for the user input element.

Validation.RequireFields(field1[, field12, field3, ...])

(v2) Specifies that users must provide values for each of the user input elements. This method does not let you specify a custom error message.

Validator.DateTime ([error message])

Validator.Decimal([error message])
Validator.EqualsTo(otherField,[error message])
Validator.Float([error message])
Validator.Integer([error message])
Validator.Range(min,max [, error message])
Validator.RegEx(pattern[, error message])
Validator.Required([error message])
Validator.StringLength(length)
Validator.Url([error message])

(v2) Specifies a validation test when you use the Validation.Add method.





Coments are closed