Click here to Skip to main content
15,908,013 members
Everything / WebMatrix

WebMatrix

WebMatrix

Great Reads

by Gianmaria Gregori
How to create and customize a Twitter Bootstrap site with WebMatrix 2 and OrangeBits Compiler
by Gianmaria Gregori
Using an upload plugin with progress bar in Razor pages
by Gianmaria Gregori
Additions to the implementations of the Uploadify plugin in Webmatrix
by Gianmaria Gregori
How to add a random sliding effect to the Bakery home page

Latest Articles

by Afzaal Ahmad Zeeshan
This article explains how you can send emails using ASP.NET Web Helpers without having to work with connections.
by Gianmaria Gregori
A working example of a jTable implementation in WebMatrix 3
by John Atten
Integrated Git and deployment to Azure
by Gianmaria Gregori
How to use the PDFBox Java library in an ASP.NET Web Pages project

All Articles

Sort by Score

WebMatrix 

2 Jan 2013 by Sheikh Muhammad Haris
Always use explicit columns both in the INSERT and in the SELECT projection. Even if you don't want to, you should. Its a good SQL practice. Just drag and drop the column names from the object browser. OR you can use the query below to get List of columns for your tableSELECT...
16 Jun 2012 by db7uk
This really (and I mean really!) depends on the actual requirements from the client. I am very bias towards Microsoft but can sometimes be very pricey for newcomers.Here are my thoughts.1) Which language. Microsoft have invested subsequent amounts of money in their ASP.NET platform....
16 Dec 2012 by Gianmaria Gregori
How to create and customize a Twitter Bootstrap site with WebMatrix 2 and OrangeBits Compiler
6 Mar 2012 by Gianmaria Gregori
Using an upload plugin with progress bar in Razor pages
11 Mar 2012 by Gianmaria Gregori
Additions to the implementations of the Uploadify plugin in Webmatrix
23 Dec 2012 by Sandeep Mewara
You can use QueryStrings if the data is small and not sensitive.For details of how to pass and use query strings, look here:Passing variables between pages using QueryString[^]Another link describing the same[^]
25 Dec 2012 by Dineshshp
if you are working in asp.net with c# :using(SqlConnection con = new SqlConnection(connectionstring)){ con.Open(); SqlCommand cmd = new SqlCommand("SELECT * FROM tableName", con); SqlDataadapter adpt = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); ...
27 Dec 2012 by Adam R Harris
Use Session State: http://msdn.microsoft.com/en-us/library/ms178581(v=vs.100).aspx[^]
7 Mar 2013 by Gianmaria Gregori
If you set the includeFormTag as true in your FileUpload helper, it makes a new form into the form that you have already created.Setting the parameter to false has the result of removing the unnecessary tag and, furthermore, lifts the upload button that you hide with CSS.Maybe...
27 Nov 2012 by Gianmaria Gregori
How to add a random sliding effect to the Bakery home page
27 Dec 2012 by Sheikh Muhammad Haris
Try this. SqlCommand command = new SqlCommand(); command.Connection = sqlCon; command.CommandType = CommandType.Text; command.CommandTimeout = 216000; command.CommandText = "Your Query"; SqlDataAdapter adapter = new...
2 Jan 2013 by DinoRondelly
This should help,http://forums.asp.net/t/1704045.aspx/1[^]
3 Jan 2013 by Gianmaria Gregori
The most used way to display data in tabular format from a database in WebMatrix is the WebGrid helper. It offers a wide variety of options for sorting and paging the rows displayed and supports asynchronously updating the grid content using AJAX.For a complete class reference look at...
4 Jan 2013 by Gianmaria Gregori
I'm not sure about having understood your question, but if your goal is to select an option according with the value of a variable, this accomplishes your expectations: impossible
5 Jan 2013 by Gianmaria Gregori
You should modify your code as follows:@gridTotal.GetHtml( columns : gridTotal.Columns ( gridTotal.Column( columnName : "AuditNum", format: @@item.AuditNum ), ...
6 Mar 2013 by cs101000
@using Microsoft.Web.Helpers;@{ Page.Title = "orderReg"; if(!WebSecurity.IsAuthenticated) { //navigate to login page Response.Redirect(App.PathUserLogin + "?returnUrl=" + Request.Url.LocalPath); } // Initialize page var FirstName =...
7 Mar 2013 by Gianmaria Gregori
In case something else is interested to the solution of this answer, Mike Brind answered to this thread: How Can i allow users belongs to role only to access files in folder?[^].
28 Apr 2013 by Prasad Khandekar
Hello,DatabaseClass in WebMatrix has a method named GetLastInsertId which Returns the identity column of the most recently inserted row. Use it to retrieve the AuditNum value and then issue the second insert. For more help see this link[^]Regards,
7 May 2013 by Gianmaria Gregori
I'm not sure you can use controls in WebMatrix.Anyway, maybe you can accomplish your task with the use of sections.If you add the row @RenderSection("otherlinks", required: false)in the head of your site layout page and @section otherlinks { }in your child page, the...
31 Oct 2013 by Member 10368517
You need to configure your IIS server to use your WebMatrix project file location as the root. As you have seen, WebMatrix uses ports in its url.Just type IIS in your Start search to get your IIS manager.change your default site path and give it a try.You may need more configuration as...
16 Jun 2012 by Member 9129971
i am a software engineering student and want to learn web development ,,,so that i can make a complete website with dynamic webpages...one company has offered me to create website for them but i have no idea where to start..any one plz guide me about1)which lang. or plateform is best for...
3 Sep 2012 by thatraja
Configured MIME type for cshtml? Clickety[^]Also check this Razor ASP.NET web pages and CSHTML Forbidden errors[^]
14 Dec 2012 by cs101000
MaleFemaleI have got a var called Gender. I wana check one of these 2 buttons based on Gender's value. if(gender==1) male is checked otherwise female. I need server-side (asp.net)...
20 Dec 2012 by VishwaKL
Use tag instead of input type. You can easily check that which value got selected.
22 Dec 2012 by cs101000
@using Microsoft.Web.Helpers;@{ if(IsPost) { //upload file var fileName = string.Empty; var fileSavePath = string.Empty; var uploadedFile = Request.Files[0]; fileName = Path.GetFileName(uploadedFile.FileName); fileSavePath =...
23 Dec 2012 by Zoltán Zörgő
You can have multiple submit buttons for the same form, but nesting forms is not allowed in html. If you look at the generated code, you will see, that this helper will generate a form. Be aware, that originally it was built for asp.net web forms, not for web pages nor mvc.Set...
27 Dec 2012 by cs101000
I want to redirect from a page to another. But I need some variables from the source page to be delivered to the target page in order to be used by it. How can I do that with asp code.
25 Dec 2012 by cs101000
var q = db.Execute("a select query");Hi! I wana access the columns (and rows) obtained from this query (like q[0].column1). But when I store it in a var it is not possible. What kind of datatype or technique can I use? Is there a difference between single row output and multiple row...
25 Dec 2012 by sisir patro
HI,Refer the following links these may help you.C# DataTableDatasetDATATABLE and DATASETThese are the different ways that you can access the columns and rows.Thanks
27 Dec 2012 by cs101000
Hi! I have a form in my webpage. The scenario is to transfer a list (of strings)List myLIst= new List();in the current page to another page when the form's submit button is clicked and the user is redirected to that other page. How can this be done?
27 Dec 2012 by ChrisTopherus
Hi,you can send data to other controls via the constructor.public List myStringList;//the construtor of you "otherpage"public MyPage(List sendedStringList){ myStringList = sendedStringList;}Best regards...
28 Dec 2012 by cs101000
I am sorry for this simple question! How to initilize a var that is going to be used for storing query result (db.query(...) or db.querysingle(...))?var queryResult;This code will cause error because the var is not initilized. And when I give it null value I get this error:Cannot assign...
29 Dec 2012 by cs101000
var ch; impossible unvisited priced in progress ready ...
2 Jan 2013 by cs101000
db.Execute(@" INSERT INTO DeletedOrders VALUES (@0, @1, @2, @3, @4, @5, @6, @7 , @8, @9, @10, @11, @12, @13, @14, @15, @16, @17)" , AuditNum, qFullOrder.Price, qFullOrder.Status, qFullOrder.PricingTime , qFullOrder.WordsNum, qFullOrder.DeliveryTime, qFullOrder.FileName ,...
2 Jan 2013 by cs101000
Where can I define global variables (like string constants) to be used in the whole (webmatrix) web app?
3 Jan 2013 by cs101000
How to organize contents of a table to be displayed in multiple pages? Consider you have a table with 100 rows and you want to view 10 rows at a time (Like the way that several Email messages are organized in pages). Do we have a special data structure for this? And how can I add filters to...
3 Jan 2013 by Sergey Alexandrovich Kryukov
It looks like what you really need is proper layout CSS styles and, no wonder… proper paging.There is a number of CodeProject article on this topic which can help you. Please see:Paging of Large Resultsets in ASP.NET[^],ASP.NET Pagination[^].Actually, there a a lot more to...
3 Jan 2013 by Gianmaria Gregori
It depends on the query type.If you use the Database.Query method, you can initialize the variable as IEnumerable queryResult = null;Otherwise, if you use the Database.QuerySingle method, the best way isdynamic queryResult = null;
5 Jan 2013 by Gianmaria Gregori
The first problem in your question is the way you queries a Database object in Web Pages.As you can see (Database Class[^]) there are three methods to execute a query:Query, to obtain a list of rows as IEnumerable;QuerySingle, to obtain a single row as object;QueryValue, to...
5 Jan 2013 by cs101000
var gridTotal = new WebGrid(qOrdersList);The result of the above query is a table with some columns including: AuditNum (an int) and Status. I want to display it in a webgrid with this code:@gridTotal.GetHtml( columns : gridTotal.Columns ( ...
8 Jan 2013 by cs101000
Hi! I have a folder containing many zip files. I wana restrict access to each file to a specific user (each file is for a specific user) in a way that other users cant access it even by having it's direct URL. How can I do this in webamtrix? Does the type of file have anything to do with the...
8 Jan 2013 by cs101000
Can a user browse the folders of my site to see what they contain? (access files and folder names that I havent provided a link for them anywhere in my site) If he can, is there a way to stop him!?
8 Jan 2013 by _Tushar Patil
Hello,when you Upload your project on IIS Disable browsing folders option.
8 Jan 2013 by Zoltán Zörgő
If you use windows authentication and impersonation, you can set file system level ACL's. But that's not a good idea.You should make your own "file server" on asp.net base. The concept is here: File Download in ASP.NET and Tracking the Status of Success/Failure of Download[^]. You can extend...
9 Jan 2013 by Richard C Bishop
I would suggest using a Theme then. 1. Add a folder called app_themes in the web root (if it's not already there).2. Add a folder called MyTheme in that folder.3. In the MyTheme folder add a skin file (right click folder and select add>>new item. from dialog select skin).4. In...
9 Jan 2013 by Sergey Alexandrovich Kryukov
Those are not "properties". They are "attributes", same as XML attributes.Obviously, you look at HTML standard and write the accordingly; generalized syntax is like in XML: …. This is for ASP.NET/HTML use.You can...
10 Jan 2013 by Gianmaria Gregori
You could use global variables, initializing them in the _AppStart.cshtml file an recalling them when you want.Try to create in the root of your Webmatrix site a new _AppStart.cshtml file with the following content:@{ AppState["mlen"] = 10;}Now create a Default.cshtml file with...
11 Jan 2013 by cs101000
DBCC CHECKIDENT('product', RESEED, 999)Hey! I have been told that this command can reset the Identity column value (for a table called 'product') but it's not working. I am executing it in webmatrix on a sdf database and I get this:There was an error parsing the query. [ Token line number =...
11 Jan 2013 by Wendelius
Have a try with a bit different syntaxDBCC CHECKIDENT ("product", RESEED, 999);GOAlso make sure that you have the sufficient privileges, namely one of these:- sysadmin - db_owner- db_ddladmin
27 Jan 2013 by cs101000
Hi! I have built an asp.net webpages site using webmatrix. But now that I published it I saw that's not working. I am sure that my windows host supports asp.net. Do webmatrix websites need special hosting? What kind of? What is the easiest solution to get rid of this disappointing situation? Do...
8 Feb 2013 by cs101000
Hi! I am trying to publish my website which uses sql server CE and I get this:Could not load file or assembly 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the...
9 Feb 2013 by cs101000
Hi friends! I get this when I wana access my published asp.net web pages website (built with webmatrix):Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))It is generated when executing the code of _AppStart page:WebSecurity.InitializeDatabaseConnection(... Is...
9 Feb 2013 by Muthuraja Irullandi
Hi,Same problem is discussed here,http://forums.asp.net/t/1726199.aspx/1[^]Best RegardsMuthuraja
10 Feb 2013 by Thomas Daniels
Hi,Have a look here:http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/6380d071-3a59-45aa-8c09-d6f068189df4/[^]
10 Feb 2013 by _Amy
This error usually means that the assembly was not found. Try verifying that the file exists in the directory where your application is running. Try these steps:--> Copy DLL to some other location as on Desktop.--> Delete reference from project and also delete the DLL from BIN.--> Copy...
10 Feb 2013 by _Amy
Since, you don't have rights to publish your website, you need to open your Visual Studio IDE as administrator. To do this follow the steps below:Quote:-->Go to start -->All Programs-->Expand Microsoft Visual Studio 2010/2008/2005-->Right click on Microsoft Visual Studio.exe-->Run as...
12 Feb 2013 by brinda f5
hiii i have a database in sql server 2005 and i want to import that database into webmatrix2....pls do help.
13 Feb 2013 by Gianmaria Gregori
If you want that your WebMatrix site have access to data stored in a sql server 2005 database, you can simply create a connection to a sql server instance.This article explains the procedure that you could follow: Connecting to a SQL Server or MySQL Database in WebMatrix [^].
6 Mar 2013 by Hassan Juniedi
I have a website that Contains pdf files stored in folder on server and i need to set access to this files in folder only for users that logged in and belong to role i choose! thanks for helping :) :)Explain the situation: name of folder is "files" name of a file in folder is "f.pdf" when i...
7 Mar 2013 by pradiprenushe
Add this code in your web.config Refer this linkAuthorization in ASP.NET
15 Apr 2013 by John Atten
Integrated Git and deployment to Azure
28 Apr 2013 by cs101000
//insert order status information db.Execute(@" INSERT INTO OrderStatus (Price, Status, PricingTime, WordsNum, DeliveryTime) VALUES (@0, @1, @2, @3, @4)", null, App.strUnVisited, null, null,...
7 May 2013 by cs101000
My project is an asp.net webpages website which has a layout including head section of pages. I wana do this: but not in layout. I wana add it dynamically via asp.net code in the home page. How is the syntax?Now I am...
6 May 2013 by cs101000
When I run optimization report for my webmatrix website, I get multiple issues stating:"the page contains unnecessary redirects". This is the code snippet that causes the problem: if(!WebSecurity.IsAuthenticated) { //navigate to login page ...
7 May 2013 by Gianmaria Gregori
Maybe could help the approach used in this tutorial[^]:- create a subfolder (e.g. Members);- put files you want to protect into this subfolder;- in the Members subfolder, create a file named _PageStart.cshtml. When any page in the subfolder is requested, this page runs first;- in the...
31 Oct 2013 by Member 10368517
I used the article "CRUD tables in WebMatrix using jTable jQuery plugin" as a guide, but elimitated the child table. I am linking/including
31 Oct 2013 by Rakesh Meel
Visit Introduction to WebMatrix[^]
12 Nov 2013 by Member 10172654
I've begun a project that involves generating dynamic website content by using a database. I can connect to the databse fine in Webmatrix's database tab but I can't seem to in the code (the database is open to external connection). Below is the Razor/HTML code I'm using and the error that is...
12 Nov 2013 by rriegel
How is the MySQL account setup? A default user for MySQL can only connect to a server from the same server. You need to create a user with the name "user"@"%" to allow that user to connect from a remote host. You can also replace "%" with a specific IP you are connecting from. Just what I'm...
12 Nov 2014 by Uvie Chizzy Jakpor
hello guys am very new to webmatrix environment and am kind of having a challenge on storing mulltiple data of texboxes into a single column but different roles..i tried using the stringBuilder to append the records but i get this error.No mapping exists from DbType...
12 Nov 2014 by DamithSL
Quote:No mapping exists from DbType System.Text.StringBuilder to a known SqlCeType.to fix that, try with ToString method var sql="insert into grade (course_name) values(@0)";db.Execute(sql,add.ToString());
2 Dec 2014 by Uvie Chizzy Jakpor
hello guys,am kind of new to the webmatrix environment,am trying to implement the use of object oriented programming in webmatrix.AM using the entity framework to handle saving records into my database.here is the problem am facingI already have a class called Students defined as...
28 Jan 2015 by Floyd Fernandes
How do I create a text box when a button is clicked with the data in the text box appearing side by side, simultaneously. This should happen in Razor C# and html or whatever other languages you can use in .cshtml page. I'm using Microsoft Webmatrix to create this site using ASP.NET framework.
28 Jan 2015 by Bhavik_Patel
try jquery to add, edit and remove html controls.Dynamically Add and Remove HTML Elements using JQuery append(), after() and remove() methods[^]
23 May 2013 by Gianmaria Gregori
A working example of a jTable implementation in WebMatrix 3
21 May 2012 by Gianmaria Gregori
How to export data from a SQL Server CE database to an Excel sheet
10 Aug 2014 by Afzaal Ahmad Zeeshan
This article explains how you can send emails using ASP.NET Web Helpers without having to work with connections.
8 Apr 2012 by Gianmaria Gregori
This article explains how to create breadcrumb navigation in WebMatrix
14 Mar 2013 by Gianmaria Gregori
How to use the PDFBox Java library in an ASP.NET Web Pages project
29 Dec 2012 by Sandeep Mewara
How can I select the appropriate option programmatically based on the value of chUsing JavaScript you can set like:function setDropDownSeletedValue(selectedValue){ var myCB=document.getElementById('myCB'); myCB.value=selectedValue;}Now, set value from code behind or JS...
28 Jan 2013 by Gianmaria Gregori
The minimum suggested requirements for WebMatrix hosting are Windows Server 2008 R2, IIS 7, and both ASP.NET 4.0 and 3.5 available (How to config the host for webmatrix?[^]), but in my experience Windows Server 2008 is enough.If you want to try to install WebMatrix on IIS 6 this thread could...
20 Mar 2012 by Dalek Dave
I have used MS WebMatrix to create an ASP.NET page.This page works perfectly well when I run it on my local machine, (either through WebMatrix or stand alone).I used FileZilla to upload this to a new host (this is an ASP.NET host, so I know that part works).The main Default page is...
17 Oct 2011 by Janardan Pandey
How to run webpage created in language WebMatrix in my localmachine ? http://localhost/index.aspxi want to run webmatrix program like thishttp://localhost/index.cshtml
2 Jan 2013 by OriginalGriff
If you do not specify column names, then you must provide data for each and every column in the table - otherwise it doesn't know where they are to go. The problem with that is, that if you have any automatic columns, you cannot provide the data because that will cause an error...It is not a...
16 Jun 2012 by Gianmaria Gregori
I agree with the majority of the considerations made by db7uk, but actually asp.net frameworks are three, and the framework not previously mentionated is maybe the best solution for a beginner: Web Pages.With Webmatrix, a Microsoft free tool for asp.net Web Pages, you could begin to create a...
3 Jan 2013 by Gianmaria Gregori
Look at this tutorial: Adding Security and Membership to an ASP.NET Web Pages (Razor) Site [^].It explains how to add security to a WebMatrix site and how to implement roles in it.
28 Dec 2012 by Zafar Sultan
Var is an implicit type. So, you will have to assign it value where you declare it. It aliases any type in the C# programming language. The aliased type is determined by the C# compiler. You can not assign null to it.
26 Aug 2015 by richosborne
Why does the following code only display the alt field and not the image?string[] imageNames = Directory.GetFiles(Server.MapPath("~/App_Data/UploadedFiles/")); foreach (string row in imageNames) { }
28 Dec 2012 by cs101000
how to make a webpage approachable only by the site admin in webmatrix?
9 Jan 2013 by cs101000
CSS properties can be set in a css file and be applied in the whole site. How about non-CSS properties like maxlength for input type of text. How can we set them in general?
19 Apr 2013 by Member 9851946
Hi I have downloaded a shopping cart template from google and i want's to integrate that downloaded template with webmatrix. How can i integrate it with webmatrix, and work on it by connecting to the database.Thanks.
4 Dec 2013 by pedrag
Hello everybody. I am having a little issue with my IIS . I can't connect to my SQL Server Management and everytime i try to open a page which includes the database connection file i get a "HTTP Error 500.0 - Internal Server Error". The version of IIS is 7.5 and i am using WebMatrix 2. Last...