asp.net-mvc

Asp.Net MVC2 best hosting.

Hi Guys, which Asp.Net MVC2 Hosting Service you can recommend ? I need Asp.Net MVC2 ;) and Mssql Database. Thank you!! regards Denis ...

ASP.NET MVC 3 Futures Library - Post New or Undocumented Feature Discoveries Here Please!

Possible Duplicate: Actually, a more specific version of below post, as mods declared below post as vague and general, yet this specific version is apparently a dupe? Asp.Net MVC 3.0 Futures - Please post your feature discoveries here? Basically trying to figure out the usage of the new features in the MVC 3 Beta Futures that ...

How to use implicit localization with MVCSiteMap?

I'm trying to use implict localization with MVCSiteMap but it's not working. Here's my sample Web.Sitemap: <?xml version="1.0" encoding="utf-8" ?> <mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" enableLocalization="true"> <mvcSiteMapNode title="Home" controller="Home" action="Index" changeFrequency="Alw...

Passing parameters when submitting a form via jQuery in ASP.NET MVC

I'm trying to do a form submit to my controller through jQuery Ajax. The following code works for the most part, however, the ThreadId parameter does not get passed. If I call the controller directly without using jQuery, it gets passed, but when using jquery, I don't see the ThreadId after form.serialize(). WHat would be the easiest ...

Is it correct to have 2 methods from my repository running in the same controller ActionResult?

I am creating a store with ASP.NET 4.0 MVC and C# and am fairly new to it. I have come to creating the View page that displays the products within a certain category. On the specific category page I want to have the product list and also want the category name with its relevant description taken from the database. Currently the way I ...

Unable to send mail using System.Net.Mail and GoDaddy SMTP

I have a site hosted on GoDaddy and have an e-mail account set up with my GoDaddy account that uses smtpout.secureserver.net as its outgoing server. I am trying to send an e-mail from my test server, not the actual GoDaddy production server, using this account. My test server is using IIS 7 and is running my ASP.NET MVC site. I use the c...

Proper way to handle button clicks in asp.net mvc?

I'm making a webpage (http://example.com/calculation/). This site will do simple calculations. The page will present the user with two input fields in the form of text boxes (asp:TextBox). I'm wondering how do I go about handling clicking on the "Calc" button (asp:Button)? Do I use the controller for the page since I'm using MVC templat...

How do I add the css class attribute to a textbox in razor?

I have tried: @Html.TextBoxFor(m => m.UserName, new {@class='textbox'}) which isn't working. ...

Asp.Net MVC Custom ModelBinder

Hi, I would like to bind a complex object to a view. I create a custom ModelBinder inherited from DefaultModelBinder so if I post the form I can reach proper data in Controller. But if I want to send data to the view the data will not be binded. Which method of DefaultModelBinder should I override? Or anybody knows the solution? l....

Update a web page automatically when an Oracle table is updated

I need to create a web page (using asp.net MVC2 and possibly WCF) showing exceptions that occur when csv type files are being reconciled with another data source. Any records (exceptions) that do not match the data source will be sent to a table in Oracle. To manually update the exceptions there will be x number of users using the web pa...

How to efficiently cache dynamic content in asp.net mvc ?

This blog post describes how to properly handle dynamic content caching when using python with GAE. It covers DownStream caching, conditional GETs, 404 responses, Etags... I haven't found anything as comprehensive related to a targeted asp.net mvc implementation. What would be the most elegant/readable/maintainable way to implement this...

How can I pass more than one array using $.ajax to ASP.NET MVC action?

I'd like to pass the contents of two sets of textboxes to an action on my controller using jQuery $.ajax. Code I have so far is as follows (all abbreviated for ease of reading): In my html: <div class="venue-holder"> <input class="tb-venue" id="venue" name="venue" readonly="readonly" type="text" value="Esfahan" /> <input class=...

Autofac with ASP.NET MVC 2 loads controllers 2 times

Hi all, i'm developing an application that uses ASP.NET MVC 2 and autofac latest release. I've developed a custom mvc helper method that allow me to easily display a custom text input in the form like this: <%: Html.MyMethod("blabla") %> The method generate a string, put it as the input value and save it also in a session. The problem...

ascx file error in MVC

Hi guys, I'm trying to render a partial ascx view within another view. I have the following error however in my ascx file, and after some research I'm still in the dark!: Type or namespace definition, or end-of-file expectedend-of-file expected Here is the code in DinnerForm.ascx <%@ Control Language="C#" Inherits="System.Web...

Request for the permission of type 'System.Security.Permissions.FileIOPermission...PublicKeyToken=b77a5c561934e089' failed.

I'm getting this error when uploading an image on my hosting. Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. It's always worked before. The only thing that's changed is I had to delete the /Uploads/ folder and recreat...

how to use tinymce with images on my website

i have tinymce embedded in my website, so if users want to edit content, then can click on an "EDIT" link and it brings up the content in tinymce editor. when they click "Save", i save the html to a database. this works perfect and avoids them calling me when they need content changes as they can go in directly and next time they reloa...

MVC Authorize attribute deny

Hi, I'm using the Authorize() attribute to secure my controllers/actions and want to only display the Login action to unauthenticated users - or to put it another way, deny access to authenticated users. I haven't been able to find anything on the web dealing with either denying permission or allowing negative permissions (ie !LoggedIn...

custom route problem?

i have made a custom route which works fine with V-S inbuilt Server but not working after deploying App. actually i have disabled all other requests from mapping and i am trying to map only request for one Action = "loggedin" and Controller = "Main". can any one help me why it is not working after deploying i am not so good in routing. T...

enable html dropdown through controller in mvc

i have an scenario where i have to perform some action according to selection of the dropdown . for basic refrence you can use the example of country,state,city. i am able to populate the country list at that time i have set the other two drop downs to disable. after the countries are populated i want to select the state.it is gettin...

ASP.NET MVC View and Controller Output Caching

What is the difference between using output cache in view: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Mahmure.WebUI.ViewModels.NewsletterVM>" %> <%@ OutputCache Duration="120" VaryByParam="none" %> and in controller: [OutputCache(Duration = 120, VaryByParam = "none")] public ActionResult Index() ...