I am looking for a set of guidelines or a checklist that you can go over for securing a public ASP.NET MVC Website. I just want to make sure that I am not making any of the obvious and well known issues when deploying a website.
Thanks.
...
I've been happily returning JsonResult objects or partial ASP.NET views from my controllers in ASP.NET.
I would like to return a rendered partial view as a property in a JSON object. e.g.
requesting
/post/detail/1
would return
{"PostId": 1, "Html": "<p>some markup rendered from a partial to inject</p>" }
This would allow me to...
I got a trivial issue.. and can't solve it.
I have this in my view:
<% if (!Model.DisplayText) { %> <%= Model.MyText %> <% } %>
As you can see, i am using 3x <% and %>. That just screams like bad code. But I can't seem to get this working in a single line. This throws all kinds of weird errors (such as semicolon missing, and when ...
Does anyone kown any open source Stock Control Systems with ASP.NET or ASP.NET MVC?
I'm planning to help my friend to build a website to manage his products after work.
The very basic functions should contain "Membership", "Low Stock Notice", "Best Before Notice" and so on.
I would love to try ASP.NET MVC with this application? If so...
How can I implement the so called "repository pattern" that Rob Conery shows in [MVC Storefront][1] when I use two different generated linq codes? Do I need to implement a real repository pattern as Fredrik Normen discusses at What purpose does the Repository Pattern have?? The thing is that I want pass some of the nice features that LIN...
I have an asp.net mvc 1.0 site that serves some content from a 2 level hierarchy
/category/article
When things work right the article maps to a view and the view gets rendered. However, when the url meets the routing condition but the view doesn't exist an exception is raised that I can't trap in the Controller action.
Routing:
routes...
I have a strongly-typed Partial View that takes a ProductImage and when it is rendered I would also like to provide it with some additional ViewData which I create dynamically in the containing page. How can I pass both my strongly typed object and my custom ViewData to the partial view with the RenderPartial call?
var index = 0;
foreac...
I need to do a Bin deployment on our ISP, Network Solutions. They have NET Framework 3.5 SP1 installed on their servers, but NOT ASP.NET MVC.
I need to point my application to a directory called cgi-bin instead of bin. Network Solutions says that this is the only directory they have marked for execution as medium trust. I need to put...
How do I find out whether a GET or a POST hit my ASP.NET MVC controller action?
...
I created a "Hello World" application, in the same vein as http://giantflyingsaucer.com/blog/?p=409. It works perfectly on my development computer, using the built-in web server.
I followed Phil Haack's advice for doing a Bin Deployment at http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx. I used the Publish feature to...
I want to have multiple path folder structure that contain same name views:
/profile.aspx
/admin/profile.aspx
/user/editpost.aspx
/admin/editpost.aspx
/Controllers
|- PostController.cs
|- ProfileController.cs
I want to be able to have all the regular pages in a folder and the admin pages in another folder. Do I need to organize m...
I've had a look at the other questions on json and either they don't fully answer my question or I'm just not getting it.
What I want to do, from my mvc app, is to call an action in the controller on the keyup event of a textbox.
I want to then pass back the contents of the textbox, do some stuff with the data and then pass back a list...
ASP.NET MVC app, close to completion, then it was decided that it needed a language switcher. It will simply be two languages: English and Japanese. They should be able to switch between the two, but if one is not selected it should choose whichever is the default language of the browser.
I'm wondering what the best solution would be in...
Hello,
I have this code :
$(document).ready(function() {
$('.DOFFDelete').click(function() {
var id = $(this).attr("id");
$.post("/Customer/DayOffDelete", { customerid: getCustomerId(), doffId: id }, function(data) {
$("#myFormDOFF").html(data);
});
});
});
In the Controller, I have th...
I am trying to create a link to an url such as home/details/1 in a jqGrid column.
The documentation shows :
showlink {baseLinkUrl: '', showAction: 'show', addParam:'&key=2'} Note: the addParam should contain &.
For example:
formatter: ’showlink’, formatoptions: {baseLinkUrl: ’someurl.php’, addParam: ‘&action=edit’}
This will output:...
I need to use some feature of VB.net that is Module for my Asp.net MVC project. But I found that C# can't handle Module like VB.net does. Please look at the following code.
VB.Net - Globalization Project
Public Module [Module Name]
Public Const WebsiteName As String = "[My Website Name]"
End Module
VB.Net - Asp.net MVC View Page
...
I am learning ASP.NET MVC and many concepts of "ASP.NET" like authentication, authorization, session state still apply to it.
But from whatever little I have understood, I don't see that ViewState is still relevant in an ASP.NET application. But it is there (property of System.Web.Mvc.ViewPage)! Is it there only for compatibility reason...
So I'm loading a partialview using an ajax actionlink, but need to embed some jquery as part of the partialview that returns. What i'm strugling with is how to fire the script once its finished loading.
...
I have some basic code to determine errors in my MVC application. Currently In the project I have a controller called Error with action methods "HTTPError404", "HTTPError500", and "General". They all accept a string "error." Using or modifying the code I am working on below, what is the best/proper way to pass the data to the Error co...
I have a number of tables in SQL. One is Controls (a typical CRUD sort of object) and one is Attachments. Attachments references Controls via a FK (there can be many attachments). Attachments also includes, amongst other things, a name and a varbinary column with file data.
Through linq, Control has an Attachments property.
I have a Co...