asp.net-mvc

Help figuring out why ASP.NET MVC rendering engine is producing unexpected HTML results

I have a modal popup with a form in it. When submitted via ajax (using jQuery) the form is validated and a javascript callback function checks to see if the model was valid. If so, the modal popup is reset and hidden, if not, the html response text is dumped into the modal popup div for the user to see the fault. I'm doing this in ASP.N...

Prevent bot from crawling certain areas of site.

Hey, I don't know much about SEO and how web spiders work, so forgive my ignorance here. I'm creating a site (using ASP.NET-MVC) which has areas that displays information retrieved from the database. The data is unique to the user, so there's no real server-side output caching going on. However, since the data can contain things the us...

Asp.Net Mvc - ContentPlaceHolder- Javascript

Depending on which page I am, I would like the content of a javascript function to change. Example : MasterPage <script type="text/javascript"> Cufon.now(); Cufon.replace('p#characters', { fontFamily: 'Helvetica95-Black' }); </script> Page A <script type="text/javascript"> Cufon.now(); Cufon.replace('p#characters', ...

Question about ASP.NET MVC and DropDown lists

Hi folks, I'm about to start a new ASP.NET MVC application. In it we have a number of drop downs lists/boxes. I have no problem rending them to the ui etc. My two questions are:- Is it possible to bind the selected value of a drop down list to an enumeration? Does anyone else actually do this (if this is possible) Are there any goo...

Receiving 404 "Missing Resource" error for Controller in ASP.Net MVC

I'm using ASP.Net MVC Design pattern and when adding a controller to my application I'm receiving the below error. I added the controller called EmailMeController.cs in the Controllers folder and everything builds correctly. I created a link to /EmailMe/ but that doesn't work. I've added another controller previously to the same site wit...

Error Sending Email via SMTP on ASP.NET MVC

I'm trying to send email from my website using SMTP. I'm getting an error whenever I do. I tested it locally using my ISPs smtp server and it worked great. Now that i'm on the web though that's not the case. I'm not sure what the error I'm getting is other then it doesn't work and I get the error message I have programmed into the site. ...

MVC Post to another action

Strait to the details... I'm working on a personal project basically it's a task list. Anyways; I managed to get the standard Add, Edit, Delete a task functionality going good; now I'm stuck on something that I know must be very simple. I would like for users to be able to accept a task from the details page, now I could easily put that...

ASP.NET MVC routing conflict - null value for input variable

I'm at a loss as to why my routes are conflicting. I have these in my Global.asax file: routes.MapRoute( "CustomerView", "{controller}/{action}/{username}", new { controller = "Home", action = "Index", username = "" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", ne...

Code on MVC Master Page

Hello All, I want to write a code on the mvc master page please tell how shall I do that,My requirement is that I want to show the tab clicked as highlighted. Please help me Thanks Ritz ...

ASP.NET MVC2 and DateTime Format

I am using ASP.NET MVC2 with MvcContrib.FluentHtml to do form binding. I want to bind a DateTime format to a textbox with specific datetime format. <%=this.TextBox(c => c.date_a).Class("readonly text-box") %> // PS. c.date_a is a DateTime gives me <input type="text" value="5/9/2009 12:00:00 AM" name="date_a" id="datea" class="reado...

ASP MVC: How to implement tabs in a partial view

I am not sure where to start to implement tabs in a MVC project. Here is the problem. I want to implement tabs in a partial view but I want the tabs to be available to all my controllers and views. When I am coding the tabs I will need to know the current controller and view so I can modify the html.actionlink with the tab querystring. ...

Why do you return the image generated by a Chart control, rather than use it in a view in ASP.NET MVC?

Why can't you use the Chart control directly in views? Why do you have to return the image generated? ...

Asynchronous Controller in ASP.NET MVC

Do you have anything more expressive on Asynchronous Controller in ASP.NET MVC? Cheers :) ...

how do you convert a string into a Json object to return to a jquery getJson call

i have code in csharp that returns this string: {'dateTimeFormat': 'iso8601', 'wikiURL': "http://simile.mit.edu/shelf/", 'wikiSection': "Simile Cubism Timeline", 'events' : [ {'start': '1924', 'title': 'Barfusserkirche', 'description': 'by Lyonel Feininger, American/German Painter, 1871-1956', 'image': 'http://images.allposters.com/imag...

Another DropDownList selected item problem

I am really confused about ASP.Net MVC (2.0 RC) DropDownList. It doesn't seem to accept my selected item. Here is my SelectListItem list (it is created inside loop. Selected being boolean) savingTypesList.Add(new SelectListItem() { Selected = selected, Text = type.Name, Value = "" + type.SavingTypeId }); Creating SelectList itself.. ...

how can we relate different conrols such as check box, drop down list etc with the chart conrol in asp.net mvc

how can we relate different conrols such as check box, drop down list etc with the chart conrol in asp.net mvc? we cant use postback method in asp.net mvc then howcan we perform different events in asp.net mvc on helpers...please tell me. thank you........ ...

Using ASP.net Server control In MVC

I am using ASP.Net MVC for my project. Can we use asp.net web controls (like Dropdown, GridView etc.) in MVC? If yes, how? Do I have to create a separate assembly and refer it to my project or is there any other way out? ...

Route not getting resolved.

I want clean URLs and have defined two routes: routes.MapRoute( "Search", "Search", new { controller = "Search", action = "SearchPanel" } ); routes.MapRoute( "SearchResults", "Search/{content}", new { controller = "Search", action = "Search", content = string.Empty, query = string.Empty, index = 0 } ); then I h...

How to set FormMethod.Get with Html.BeginForm

I would like to have my form do a Get rather than a Post (It's a query field the user is submitting) I know I can do it with <% using(Html.BeginForm(action, controller, FormMethod.Get) {%> However, I would rather not have to specify the action/Controller and there doesn't seem to be an overload that takes FormMethod only. This is M...

ASP.NET MVC jQuery script added in View not working

Hello, In my view, I generate the HTML, and add some jQuery/Javascript code. The view is displayed in a div of my main page. The jQuery code I added is there but not working. When I place the same code directly hard-coded in the view that's work. In my view, it's as partial view (.ascx) I have something like this : <%= Model.GetMyScri...