Questions tagged [webmatrix]

Microsoft WebMatrix consists of a basic IDE bundled with a simple but powerful SQL database and a lightweight web server. WebMatrix is no longer recommended as an integrated development environment for ASP.NET Web Pages. Use Visual Studio or Visual Studio Code.

Microsoft WebMatrix is a basic development environment for creating websites. It's bundled with a simple but powerful SQL server (SQL Server Compact) and a lightweight web server (IIS Developer Express).

Languages supported include C#, VB.NET, and PHP. The native view engine uses Razor syntax optimized for HTML development. Although the full ASP.NET stack is available, developers can choose "Web Pages" which offer simplified web development.

It reached end of life in November 2017, so shouldn't be used any more.

Also see: , , ,

1222 questions
0
votes
1 answer

WebMatrix Database with Timestamp

I'm having a difficult time attempting to get this thing going, and I don't know why. I'm attempting to set up a site which is backed by a database. The company I work for makes this possible through WebMatrix. I have all my web files uploaded and…
Murphy1976
  • 1,415
  • 8
  • 40
  • 88
0
votes
2 answers

Difficulty displaying row counts using WebMatrix

I have the following code: @helper RetrievePhotoWithName(int userid) { var database = Database.Open("SC"); var name = database.QuerySingle("select FirstName, LastName, ProfilePicture from UserProfile where UserId = @0", userid); var…
shane
  • 229
  • 3
  • 13
0
votes
2 answers

Check number of Unread messages in Table?

I have done this before but this time it's just not working. All I am trying to do is COUNT() the number of unread messages there are in a table. Table def: UserId(int), From(int), Type(nvarchar), Message(nvarchar), Read(bit) The Read and UserId…
shane
  • 229
  • 3
  • 13
0
votes
1 answer

Can't installing Umbraco on LocalMachine

I want install Umbraco 5.0 on WebMatrix. But i am sends back to me after the third step, What's Problem ?
Polymorphism
  • 375
  • 1
  • 3
  • 11
0
votes
1 answer

WebGrid with Select * Like *

I use a WebGrid to display the result of: select * from table where column like '**'; There is no problem displaying the result. However, if I click the column name of the WebGrid to sort the results, I will get an error or there is nothing…
ZZYTIGER
  • 1
  • 1
0
votes
1 answer

How to use ajax post on webmatrix webimage helper especially in webimage.getImagerequest()

I've been trying to use the webimage helper in webmatrix to upload an image using ajax but its not clear to me how i can pass data to the webimage.getImageRequest("Image") method from the ajax post.This helper seems to retrieve its file upload data…
Ifeanyi Chukwu
  • 3,187
  • 3
  • 28
  • 32
0
votes
2 answers

I edited the brand.png picture, but the old one still shows up in the bakery template

I'm a beginner at webprogramming and am just starting to fool around with the Bakery template in Microsofts Webmatrix. I'm trying to change the logo shown in the layout and looking in the Images folder for the template, there is only 2 pictures and…
Kasper Hansen
  • 6,307
  • 21
  • 70
  • 106
0
votes
1 answer

Extending on DNN Users and Roles, possible?

The way I create my menus is causing a slight problem. I define the style in my style-sheet and create a module with html in it, here's an example of the HTML:
0
votes
2 answers

How should I amend this code to make it work in Razor C#?

I would like to add 2 variables in Razor C#. Therefore I tried this: var newpenpoints = result.PenaltyPoints + int.Parse(penalty); But I think it is not working as when I try to put the figure into database: var sql5 = "UPDATE Permit SET…
Panda
  • 71
  • 1
  • 2
  • 9
0
votes
1 answer

Any idea how to improve my if else statement to make it work?

hi i am trying to do an if else statement: @{ if(isset(Request["approve"])) { var sql6 = "UPDATE Medical SET NurseDecision = 1, NurseCDSID = @0, NurseDate = GetDate() WHERE MedId = @1 AND AppId = @2 AND CDSID = @3"; var appMedical =…
Panda
  • 71
  • 1
  • 2
  • 9
0
votes
1 answer

Would like to learn how can i translate this type php code to Razor C#

I would like to set radio buttons checked base on results from query such as in my case its a medical questionnaire. A medical questionnaire results last quite a while. So if user do not have a valid medical questionnaire, the use will be directed…
Panda
  • 71
  • 1
  • 2
  • 9
0
votes
2 answers

How do I reset array content

I'm using @RenderPage passing an array: @RenderPage("/Shared/_ScopeFormControls.cshtml", ChangeScope) The array is declared and set initially as: string[,] ChangeScope = { { "True" }, { "" }, { "" } }; The receiving page deconstructs the array…
Pinwheeler
  • 103
  • 1
  • 3
  • 10
0
votes
1 answer

Index was out of range. Must be non-negative and less than the size of the collection

While trying to validate form data on my page i get the following error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index. my code for this page is:…
mhcodner
  • 553
  • 1
  • 5
  • 20
0
votes
1 answer

Prevent accidental update of host database WebMatrix

I use WebMatrix for deployment of files and databases during development. I want to continue to use it after development for updating files on the host. I also want to synchronize my local database to the host database, but never the other way…
ATL_DEV
  • 9,256
  • 11
  • 60
  • 102
-1
votes
1 answer

MVC Authorize Redirect to Another Url

I use WebMatrix.WebData; In my MVC project, inside controller I wrote this line of code: [Authorize(Roles ="Members")] When login fails, it will redirect my application to Home/Login. But I want to redirect to Home/Register. How can I do this?