asp.net-mvc

ASP.NET MVC Facebook

I am trying to do a seemingly simple thing, but having trouble accomplishing it. I am trying to automate the posting on my Facebook wall. Basically I have a ASP.NET MVC website that I post updates on, and I want to automatically submit the post to my wall. I see a lot of stuff on FB Connect and getting data, I just want to post. Thanks...

Trying to build a Drupal-like CMS in ASP.NET MVC - Newbie Questions

I am new to ASP.NET MVC, and the ASP.NET technology in general, so, please, excuse the stupidity of my questions. I have a lot of experience with php development and CMS customization (Drupal and Wordpress mainly), and I wanted to know whether some techniques could be applied in asp.net mvc. I want to know what exactly could be modified ...

Routing in ASP.NET MVC

Hi! I want to identify categories in my site in url not by id, but by its name. When i'm adding category, which name contains "+" symbol - i have 404 error. This situation is on product internet server, when i'm deploying on local visual studio server - all work fine. Please, suggest me smth. Example: routes.MapRoute( "Defaul...

Defining view models for MVC / MVP

Hi guys, Short question - how do you define your view models? Here are some of the options: Pass the actual model into the view. Create a view model with a reference to the model (like Model.Product) Create a view model with the properties needed from the model, and set those from the model. Probably a lot more. All with their own ...

How to display binary data in asp.net mvc

Hi, Been searching for days now, but I can't seem to get what I need. Here's the problem, I have a page where users can upload a file (.doc, .xls, .pdf, etc) and save it to db in binary format (still ok here), however, I need to be able to display the file (with the proper format) in a div tag which I can't figure out how to do. Not s...

Advice regarding website security

Hi, We have just finished developing a new website for my company using the .NET MVC framework. The sql server supporting our application holds some critical data such as the profiles of other web users and we would like to make sure this data is never leaked due to a reputational risk to the company. We have a number of ideas on thing...

Distinct() on Class, anonymus type and SelectListItem

I want to select all categories from a webservice. The webservice does not have a method for that, so I have to get all products, then select all categories that these products are in. When I recieve the data from the webservice, I make WebServiceProduct (ID, Name, etc) and WebServiceCategory (ID, Name, etc) objects of it. This does not...

How to assign values from database to chart series in asp.net mvc?

Hello, I am working on chart project. I used below code to generate the chart Chart chart = new Chart(); chart.ImageType = ChartImageType.Png; chart.BorderlineDashStyle = ChartDashStyle.Solid; chart.BackGradientStyle = GradientStyle.TopBottom; chart.BorderlineWidth = 2; chart.Bor...

how to deploy asp.net mvc to my desktop so that it be visible to all computers in the network?

Hello, I've developed a tiny application in ASPNET MVC that I'd like to deploy. Our network has 2 servers and 20+ desktops. The two servers have our applications (written in java) running in them. [we're not a software company - I've learned ASP.NET MVC on my own and would like to show it to my people - who knows? that might open doors....

Active Directory integration for remove asp.net website

We provide a hosted web application for multiple companies. Now we see the need to provide the ability for uses to 'auto login' if the are already logged into/identified by their individual local domains. What would be the best solutions for this? Would it be to have a certificate associated to their local AD account that our web applica...

asp.net mvc and canonical link: bug?

I created a simple CMS in asp.net MVC. Every article has a canonical link, which I want to use in my master page like this: <link href="<%= Model.CanonicalLink %>" rel="canonical" /> However, when I view the source of this page in Firefox, it shows me: <link href="../../Views/Shared/%3C%25=%20Model.CanonicalLink%20%25%3E" rel="canoni...

Clientside validation not working with sub-properties in ASP.NET MVC 2?

I have an object named User, with a property Name, with a Required attribute. public class User { public int Id { get; set; } [Required] public string Name { get; set; } } I have created a textbox, like so: <%= Html.TextBoxFor(model => model.Name) %> When enabling clientside validation, Name is perfectly validated c...

ASP.NET MVC: Is it possible to get the controllername inside of a view?

I have this helper in my view: <%= Html.StandardOverlayCreateButton<EmployeeController>()%> It creates the following HTML: <a rel="#overlay" href="/Employee/Create"> <button type="button"> Create</button> </a> I do not like this anyway. Any suggestions :) ? I also askmyself when to create html helper extension and when just wri...

running a daily job as a URL on a hosted server

i have a hosted web site and i have an asp.net mvc site. The hosting company allows you to setup "scheduled tasks" which are basically just using the windows scheduler. The service checks a URL at whatever interval that you want but all you can supply it is a URL. i want to have a job that runs a db query and emails out to me the resu...

Cross domain post.

I want to do a cross sub domain post in asp.net mvc and as the post data ,i want to pass an object which will be used in the recieving action in controller .Can anyone suggest how i can do that? There are two applications .Application 1 needs to open application2 in a separate browser and post some data to it which application 2 will u...

Create link for asp.net mvc application

Hello, I have menu on my website, some links are internal and builds with Html.ActionLink method, and some are external and builds with tag. But I don't like this code, I prefere to have one line instead of two lines. But I don't know how to do it, can anybody help me please? <table width="100%" border="0" cellpadding="0" cellspacin...

using ssl with aspnet mvc creates a problem when posting data on to the page which is secure

I know there are many posts regarding and it works fine if the action method which i am calling is just a get method, but it fails if the action method has a 'Post' attribute because in the code we do a redirect to the url and not a post I am using code below... using System; using System.Web; using System.Web.Mvc; namespace Helpers {...

MVC: Model is null in a view's aspx

Hi, I'm following this MVC tutorial and when I add a View for the Edit action, Model is null in the following snippet on the .aspx page: <%= Html.TextBox("Id", Model.Id) %> I'm learning MVC, so please understand if I'm doing a dumb thing. But as far as I can see, I've following the steps in the tutorial pretty well. And actually added...

Strongly typed view with a SelectList for DropDownList via ViewData: type mismatch on submit

I am trying to create a form in ASP.NET MVC2 RC 2 that is based on a calendar event object. The object has eventTypeId which is a System.Int32 that I need to populate with via a select list. The controller to create the initial view is: [WAuthorize] public ActionResult AddCalendarEvent() { CalendarEventTypesManager calendarEventTyp...

Using strongly-typed HTML helpers with composite Views

I have a a simple registration DTO with several sting properties: Username, Password, Email To the view I pass in a strongly-typed ViewModel, that itself has the registrationDTO but also has additional properties to display in the view. When using strongly typed html helpers, on the registrationDTO properties, I need to say Html.Editor...