asp.net-mvc

ASP.NET MVC Unknown server tag error

Hi All, Just wondering why could not i cought this issue in local testing ? I am using a Content Panel user control in all my user controls. In one of the user control i missed the register tag for Content Panel UC . While testing locally all things were working fine . Suddenly in QA box i got a critical issue. Application was thorw...

How do I embed a flash object in my MVC2 Application Home?

I need to put a Flash Object in my website developed on MVC2 .NET, however the third party who made it just gave me an html with this code.HTML errors apart I don't know how to put it on ASP.NET. Can you help me? <table width="608" border="0" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4"> <tr> <td height="4...

ASP.NET MVC without javascript

We're developing a site initially without javascript for maximum support with the intention of layering js functionality over the top. The problem we have is where a single page has 2 or more pieces of functionality (as an example a screen to capture personal details that includes a postcode lookup for address). With no ability to cha...

Is it possible to have a ASP.NET MVC MasterPage that has webforms User Controls which cause PostBacks?

I'm pretty sure the answer is going to be no here, but I just want to be sure. As you can probably guess I'm in progress of converting a web forms project over to ASP.NET MVC. Thus, I have a web forms master page and a MVC master page. The user controls (.ascx) render fine in the MVC Master page, but the post-backs essentially do nothing...

ASP.NET MVC app can't find Views since I moved my app to a new directory

I copied my app and put it somewhere else. Then I changed IIS to look at the new place and ran it. Debugging it - it runs through my Controllers in the new location fine. But when it nips off to get the view it goes to the old location of my app?!? ...

ASP.NET MVC2 - is it possible to access parent view's model data from partial view?

In handling a 1--->0...1 relationship, I'm trying to use a separate partial view for the 0...1 end. I'd like to use RenderPartial() rather than RenderAction(), for the sake of efficiency. Is it possible to gain access to the containing view's model data from this partial view, in order to access the PK/ID of the main object? Is this j...

Help with mapping ActionLinks to Methods in Controllers (ASP.NET MVC2)

I'm on my first MVC project and still haven't got a complete hang of it. I ran into this issue: I have this in my View (Home/Index.aspx) <% using (Html.BeginForm()) { %> <fieldset> <p> <%: Html.TextBox("A")%> <%: Html.TextBox("B") %> <%: Html.ActionLink("Submit", "Create", "Home")%> </p> </fieldset> <% } %> I have this...

Waiting for ajax request to finish before getting the resposne

I'm extremely new to mvc and webtest so please bear wtih me here. I have a customer view. The customer view calls a javascript function on document.ready. This javascript call performs an ajax post to an action in the customer controller which returns json to the original javascript which in turn updates the customer view. In my webtes...

How to write action links using javascript in ASP.NET MVC?

I have a script that appends some rows to a table. One of the rows has a delete link, and for that I am using a ActionLink, however the id of the element is received via js, and this is nor working: $("#Table").last().append('<tr><td><a href=\"<%:Html.ActionLink("Delete", "DeleteElementFromSet", new {id=%>Id<%})%>">Delete</a></td><td>'...

how to Play wmv and flv files in asp.net mvc

i want to play video files like wmv and flv in my asp.net mvc application? what is the best solution or plugin to do so ...

What are the disadvantages of using Ruby on Rails versus ASP.NET MVC to build a social website?

I ask specifically what the disadvantages are because it's easy to find and read about the advantages of using RoR instead of ASP.NET MVC. But I'd like to have a better understanding of the disadvantages so I have a better idea of what to expect when I begin building a social website using RoR. Thanks so much in advance for your wisdom!...

Generating a list of categories and subcategories with asp.net mvc2

I have a feeling I'm doing this horribly, horribly wrong. Nested for loops? What is the best practice method of listing subcategories? I have a feeling it involves preparing the list in my controller action and sending it to the client via some actionresult, but I don't know where to start? Anybody able to point me in the right direction...

Getting Uploadify to work with asp.net-mvc

Hello, I am trying to get Uploadify to work with my site but I am getting a generic "HTTP Error" even before the file is sent to the server (I say this because Fiddler does not show any post request to my controller. I can browse correctly for the file to upload. The queue is correctly populated with the file to upload but when I hit o...

jQuery POST to ASP.NET MVC2 action, string is binding, integers aren't binding...???

Here is the JS: $('#createReview').click(function () { CKEDITOR.instances['ReviewText'].updateElement(); $.ajax({ type: 'POST', cache: false, url: '/Review/Create', data: $('#reviewForm').serialize(), dataType: 'html', success: function (response) { $('#bookReview').htm...

Using Dependency Injection with Http Handlers

I am using ASP.NET MVC 2 with Ninject, and Linq2SQL behind a repository pattern, based on Rob Conery's TekPub Starter Site. With controllers it all works fine, however I have an HTTP Handler (it serves and resizes images from a DB), and I have no idea how I use Ninject to replace my ISession interface with a concrete instance of my Linq...

How best to handle late data validation using asp.net MVC 2's data annotation validation?

Typical scenario, post to an action that checks ModelState.IsValid and if it is, saves to the DB. Validation rules are set as data annotations in the Model. Here's my issue. I have a data field that can't be longer than 400 characters. The data annotations enforce this, as well as a jQuery validation on client side. User enters 395 cha...

ASP.NET MVC using Url.Content with dynamic images

How can I create a dynamic url to display an image? I am creating a web page that lists search results of products and their associated images. I tried using Url.Content, but it does not format the url correctly. Code I created: <img src="../../Images/<%: product.PicFileName %>" alt="photo" /> Html that was output: <img src=".. .....

ASP.Net Dynamic Data or MVC2 ?

I've been working with web-forms and I want to switch to the MVC pattern based on some facts and other goodies that I see in it. I was going good with MVC review when I came across the latest Dynamic Data (which in past was called Dynamic Data Templates). Correct me if I'm wrong but I believe in backend both MVC2 & DD use the MVC patter...

How MVC fill Id parameter?

Hello, today I've got some interesting observation, that I need to explain. I've got my Person class that is described as above: public class Person { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } now in my MVC2 application I've got PersonController with following ed...

Dropdownlist in ASP.NET MVC2

Hello, In my model, I have this : public class CustomerModel { public Customer Customer { get; set; } public Language Language { get; set; } public IList<Language> Languages { get; set; } public CustomerModel() { Language = new Language(); } } In my view, I have t...