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
0
votes
1 answer

Declare functions in ASP.NET WebPages

Is it possible to declare functions (as you would do in C# not javascript) or create classes in ASP.NET Web Pages? How about in MVC, in the View files? If not, is there anyway to do event handling in Web Pages? (Again, NOT javascript…
Yamcha
  • 1,264
  • 18
  • 24
0
votes
2 answers

Set global variable at compile time from cshtml page

In a ASP.NET Web Pages 'site', created with webmatrix (razor template, c# code). Can I set a variable in the cshtml template that would be 'global' (AppState) WITHOUT executing that page? I know that I can set "AppState.Whatever = " on the page, but…
Tixiv
  • 170
  • 1
  • 7
0
votes
0 answers

Why does moving my script references to the bottom of _SiteLayout.cshtml cause the tabs to no longer work?

I'm using jQuery-UI tabs in my site. I've got this: