How do you set the content type for a WebMatrix/Razor Response?
I'd like to return some XML instead of HTML in my WebMatrix cshtml file? How do you change the content type header? ...
I'd like to return some XML instead of HTML in my WebMatrix cshtml file? How do you change the content type header? ...
Or is it also compatible with asp.net or asp.net mvc? ...
Recently Microsoft (via Scottgu) has announced some new technologies (WebMatrix, ASP.NET Razor, IIS Developer Express, SQL Server Compact Edition). I think this is something new direction in which Microsoft is trying to move since launching of ASP.NET MVC. I think the clear target of these new moves are Ruby/Python/PHP/.. developers or c...
I'm playing around with WebMatrix and I'd just like to explore some of the razor stuff behind the scenes... but my Reflector skills (and my brain) are failing me. Does anyone know offhand what assembly I should start looking in (and/or a location for it)? ...
Is there any way to get intellisense with razor in VS 2010, I am working on an application with web matrix and launched VS 2010 from WebMatrix. ...
Is it possible to use Razor on an existing Asp.Net 4 WebSite? ...
Although this question isn't directly about code it's related to programming and seems better put here than, say, serverfault or superuser. -- I'm a developer with Visual Studio 2010. Microsoft's newest web server offering for developers is IIS Express. ScottGu indicated this combination is workable: IIS Express will work with VS 2...
Hello, Could some one give a simple example of creating a simple class with a simple method and calling the method from cshtml file in webmatrix? I am trying to figure out if WebMatrix could be used in an object oriented way that would allow me to take advantage of the razor sytax as a view engine alternative to the MVC framework that I...
Hi All Does anyone know a way of viewing and editing an existing SQL CE 4.0 databse? I've tried using SQL Server 2008 but it looks as if it only supports version 3.5. I read on Scott Guthrie's blog that you can use WebMatrix but I can't figure out how. The blog article is located here: http://weblogs.asp.net/scottgu/archive/2010/07/1...
Hi everyone! I'm trying to submit form data with jQuery. I'm using ASP.NET WebMatrix. In a .cshtml file I have @{ // other code if(IsPost) { var item = new Item(); item.Title = Request.Form["title"]; item.Description = Request.Form["description"]; // aditional code here } } <script type...
I create asp .net page and i have use windows user to authenticate. <authentication mode="Windows" /> I create simply page with one label and display information. if (Page.User.Identity.IsAuthenticated) { Label1.Text = "Authenticated = 'TRUE'<br/>"; Label1.Text = Page.User.Identity.Name; } else { Label1.T...
I've already enabled firewall rules for IIS Express (HTTP Traffic In) and IIS Express (HTTPS Traffic In) on ports 80 and 2012 (this one is used in WebMatrix), but I can't connect to the server from my LAN. WebMatrix is running on a virtual Windows 7 machine. Is this a limit of IIS Express?> Yes - you can redistribute IIS Express with yo...
I've got two form fields from which the user submits a 'category' and an 'item'. The following code inserts the category fine (I modified it from the WebMatrix intro PDF) but I've no idea how to then insert the 'item' into the Items table. I'll also need to add the Id of the new category to the new item row. This is the code that's wor...
I am trying to retrieve xml from a small function in my .cshtml page. Its throwing me an error. This however, runs fine in a console/form environment. It takes 3 parameters and 1 exception. myDll.GetXML(year, username, uniqueidentifier, out ex); When I run this page I get the error, “Conversion failed when converting from a character...
I'm fooling around with WebMatrix, and so far the best way I've figured out how to use stored procedures with Razor/WebMatrix is like so- @if (IsPost) { var LinkName = Request["LinkName"]; var LinkURL = Request["LinkURL"]; string sQ = String.Format("execute dbo.myprocname @LinkName=\"{0}\", @LinkURL=\"{1}",LinkName, LinkURL); d...
I added a connection and it shows up in "Other Connections" but I can't seem to reference it. var db = Database.Open("MyNewConnection"); throws an exception: Connection string 'MyNewConnection' was not found. ...
I have an ASP.NET site where authentication mode="Windows". Just downloaded WebMatrix beta 2 yesterday, trying to debug my app. In WebMatrix, I'm getting 401 errors after pressing F5 in Visual Studio. Also in VS, getting "Unable to start debugging on the web server. An authentication error occurred while communication with the web serve...
Hi all, I'm getting some funky behavior with session variables with Razor .cshtml pages. Essentially on some pages I check to see if a Session variable is set, and if not I set it. I keep getting a null object reference. I believe this is because ultimately Razor is designed for MVC, and I did a little reading about the MVC life cyc...
I would like to build my first Wordpress site as quickly as possible, but I happen to lean towards Microsoft products. I don't plan on touching code/PHP to build my Wordpress site, but I should mention that I am currently an expert C# developer in Visual Studio and have built ASP.NET 1.1 in the past. So should I go with Visual Studio 2...
Hi, The Webmatrix Html helpers look quite handy. Is there any way to use them from a regular ASP.NET MVC project with Visual Studio? Thanks, Adrian ...