Questions tagged [asp.net-webpages]

ASP.NET Web Pages is a page-centric lightweight development framework from Microsoft for building dynamic web sites.

ASP.NET Web Pages is the third web development model released by Microsoft after ASP.NET Web Forms and the ASP.NET MVC framework. Web Pages saw the introduction of Razor, a template syntax that enables the embedding of server-side code (C# or VB) within HTML markup. In this respect, the Web Pages framework offers a similar web development experience as that provided by PHP, classic ASP and other scripting technologies. This is deliberate, as the Web Pages framework is designed primarily to attract classic ASP and PHP developers to the ASP.NET stack - offering a "low concept count" introduction to ASP.NET.

Web Pages are developed using .cshtml (C#) or .vbhtml (VB) files. Typically, a file represents a page in a web site and will contain both the server-side code to manage the programming logic, and the HTML, CSS and JavaScript to be rendered to the browser.

Web Pages supports a template system based on layout files and the ability to dynamically include the contents of other files within a parent file at runtime. Web Pages also introduces a simple data access technology - the Database helper - based on the C# 4.0 dynamic type.

Despite the emphasis on simplicity, the Web Pages framework provides developers access to the entire .NET framework, enabling development of complex web sites.

More information at http://www.asp.net/web-pages

441 questions
6
votes
3 answers

How can I get started using OpenID/OAuth with my WebMatrix site?

If I misuse or confuse the terms OpenID and OAuth, I apologize, I am still new to this whole decentralized login process. I have been trying for days now to get my site (built in WebMatrix) to recognize a Google login. The problem is I need this…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
6
votes
2 answers

Method 'get_IsBindingRedirectSupported' does not have an implementation

So I'm trying to create a ASP.NET Web Site (Razor v2) website in Visual Studio 2012 but when running the site I get this error. Method 'get_IsBindingRedirectSupported' in type 'System.Web.WebPages.Administration.PackageManager.WebProjectSystem' from…
Johan Alkstål
  • 5,225
  • 9
  • 36
  • 48
6
votes
2 answers

How to change scope/permissions with Microsoft.Web.WebPages.OAuth

Is there a way to change the scope/permission when using Microsoft.Web.WebPages.OAuth? The most logical place is when registering the client with OAuthWebSecurity.RegisterClient. I thought that the adding scope to the extraData parameter would…
Josh C
  • 7,461
  • 3
  • 24
  • 21
5
votes
1 answer

Add a namespace reference to ALL web application web pages in a different project

I have a solution with three projects: Project 1 - Reusable Logic/Methods (applicable to all other projects) Project 2 - Web site Project 3 - Web application (project 2 being converted to a web application) In project 1 I have this code: Imports…
EvilDr
  • 8,943
  • 14
  • 73
  • 133
5
votes
2 answers

Entity Framework Enable-Migrations

All my searches are coming back to the same one of two issues, which aren't the problem in this project. I've never had trouble with this before, but this particular project is being weird. First off, the project name is Site. The class SiteContext…
user2642885
  • 103
  • 1
  • 6
5
votes
1 answer

System.Web.Mvc vs. System.Web.WebPages.Html for SelectList

I noticed today that both namespaces System.Web.Mvc and System.Web.WebPages.Html have a SelectListItem. What is the difference between the too and is there times you should use one over the other?
Matthew Verstraete
  • 6,335
  • 22
  • 67
  • 123
5
votes
7 answers

Asp:FileUpload edit "No file selected" message

I just need to know if there's a way to change the message shown by the Asp:FileUpload when no file as been selected. Thanks.
Guillermo Oramas R.
  • 1,303
  • 2
  • 14
  • 31
5
votes
2 answers

Manually trigger validation on a specific form element

I'm using Validation.Add() and the Html.TextBox() (and related) helpers in conjunction with unobtrusive JavaScript error checking and am very pleased with the results. It covers the server and client side with one set of code and generally I've been…
Polynomial
  • 3,656
  • 23
  • 36
5
votes
1 answer

How can I make a custom error page in ASP.NET web-pages with WebMatrix?

Believe it or not I tried to look for the answer to this question with a simple Google Search but I didn't find anything (Googled with "WebMatrix custom error page", "WebMatrix how to make custom server-side error page", etc.), but perhaps I am not…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
5
votes
2 answers

Why won't my $.ajax call return a json object from a cshtml file?

I have this jquery that uses ajax in an attempt to return a json object, but I am no pro at ajax, though I have used it before with json, only I was loading a json file and not trying to return a string from a cshtml page that queries a database for…
VoidKing
  • 6,282
  • 9
  • 49
  • 81
5
votes
1 answer

Can I use ASP.NET Web Pages without deploying the "bin" folder?

I am creating a very simple site that was originally just a bunch of HTML / CSS files. Then I needed to add a little bit of server-side logic so I thought I'd use ASP.NET Web Pages as they sound like a suitable solution. So I changed index.html to…
Borek Bernard
  • 50,745
  • 59
  • 165
  • 240
4
votes
0 answers

measuring performance ASP.NET Web Pages with Razor Syntax vs. Classic ASP

Any info on classic ASP in comparison to ASP.NET Web Pages with Razor Syntax? Which can handle more traffic and which is faster? Are there any benchmarking tests between the two? I found this question: ASP.NET MVC 3 Razor performance, but it's…
Wilkins
  • 185
  • 1
  • 4
  • 13
4
votes
2 answers

"Index was outside the bounds of the array" error while publishing a .NET Web application

I have a simple .NET Web application that works fine when I run it on my local machine. However, when I try to publish the application to a local folder, I see the error that says "Index was outside the bounds of the array." This error, I'm afraid,…
Susie Dent
  • 73
  • 2
  • 6
4
votes
2 answers

View Engines for Web Matrix Web Pages

Microsoft has a new website editing tool: WebMatrix. WebMatrix uses the new Web Pages engine in which Razor is the view engine; Razor is also the new view engine for MVC3. I am attempting to find out if it is possible to register and use a different…
jr.
  • 1,797
  • 2
  • 15
  • 18
4
votes
1 answer

Dynamic Web Controls when using Pure Razor

I want to make a dynamic control on a web page that does an action and generates new HTML code without needing to refresh the page (what would traditionally be handled by JavaScript, I presume). However, my project is currently comfortably and…
Nerve
  • 317
  • 2
  • 8
1
2
3
29 30