webmatrix

Webmatrix 3 Sql Server CE 4 Busted?

删除回忆录丶 提交于 2019-12-10 22:13:50
问题 Ok, when I create a sql server CE .sdf database in the new Webmatrix 3 I run into a problem. I've narrowed an example down to this. 1) I create a table called test. One column "test_ID" is a bigint, primarykey, and an identity. 2) I create another column called "test_desc" which is a nvarchar(50) with all the defaults. Problem. I cannot insert data using the GUI. Something about the column name cannot be modified. This is very annoying and somewhat disappointing for a new release to have such

Webmatrix csv import to SQL Server Compact

随声附和 提交于 2019-12-10 21:13:31
问题 I just switched to Webmatrix because the server I was using stopped supporting MySQL / PHP. Now I'm converting my old php mysql site to Webmatrix with SQL Server Compact. But I have hit a little snag. I'm using a script to directly import csv files into my database, in php/mysql this was not that hard to do but I can't get it to work in Webmatrix and SQL Server Compact. Anyone having ideas on why it does not work? mysql_query("TRUNCATE TABLE `tmp_st_age`"); $age = 'load data local infile "..

Is there a way to search the fields of all tables at once, in SQL Server CE?

时光怂恿深爱的人放手 提交于 2019-12-10 18:33:55
问题 I was hoping that within the WebMatrix (C#.net) environment (using SQL Server Compact) that there was a way to search all tables and fields for a value. I have a bunch (like 100) of tables, connected to via WebMatrix and I am trying to look for a table that holds some information I need. I have been here: http://blogs.thesitedoctor.co.uk/tim/2007/11/02/How+To+Search+Every+Table+And+Field+In+A+SQL+Server+Database.aspx And here, on stackoverflow: search all tables, all columns for a specific

Header Format for WebGrid

泪湿孤枕 提交于 2019-12-10 18:20:08
问题 I just read: http://www.mikesdotnetting.com/Article/154/Looking-At-The-WebMatrix-WebGrid and see a reference to [Optional, Default Value(null)] string header Header text if you don't want database field names But I'm not sure how to format cell values. For example, if I have a WebGrid that looks like this: Column Name Column Name Column Name Column Name Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell value Cell

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

不羁的心 提交于 2019-12-10 14:04:57
问题 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 searching with the correct terms... Anyway, I was just wondering if there was a way (I believe it involves the web.config file) to show a custom-made error page instead of ANY server-side error page. I know there is a way to do this with some pages

jQuery post from ASP.NET web page (WebMatrix)

点点圈 提交于 2019-12-10 13:56:41
问题 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="text/javascript"> $(document).ready(function(){ $("form#itemForm").submit(function(){ $.post("form.cshtml", { title: $("#title").val(), description: $("#description").val(), price: $("#price").val()}, function(data){ },

Webmatrix WebSecurity not authenticating

佐手、 提交于 2019-12-10 11:48:34
问题 I am trying to setup simple membership on an existing website I've just built using WebMatrix. I've followed the steps in this tutorial - http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=2240 The problem I have is that after login if I call WebSecurity.IsAuthenticated it never seems to actually be logged in. The code on the login gets as far as the redirect so one would assume the user has been authenticated. Here is my login code: @{ var username = ""; var password = ""; var

Is there any way to loop through my sql results and store certain name/value pairs elsewhere in C#?

我只是一个虾纸丫 提交于 2019-12-10 11:08:32
问题 I have a large result set coming from a pretty complex SQL query. Among the values are a string which represents a location (that will later help me determine the page location that the value came from), an int which is a priority number calculated for each row based on other values from the row, and another string which contains a value I must remember for display later. The problem is that the sql query is so complex (it has UNIONS, JOINS, and complex calculations with aliases) that I can't

IIS Express (WebMatrix) open for outside connections

老子叫甜甜 提交于 2019-12-10 02:06:45
问题 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 your applications. There are no connection limits. ScottGu's blog 回答1: It is possible though it takes some effort, there's a great blog post on this here and

WebMatrix sql LIKE %

南笙酒味 提交于 2019-12-07 13:30:39
问题 I am having trouble with the following query. It works when I execute it directly from WebMatrix with static parameters and returns a few rows, but not from my .cshtml page var accounts = database.Query( @"SELECT Username, Email, row_count FROM (SELECT Username, Email, Count(0) OVER() as row_count, ROW_NUMBER() OVER(ORDER BY @0 DESC) as row_number FROM UserProfile WHERE Username LIKE %@1% AND Email LIKE %@2%) as accounts WHERE row_number BETWEEN @3 AND @4", new object[] { sort, username,