asp.net-mvc

asp.net mvc jquery + tabs +jqgrid +jqgrid loaded only for first tab

Greetings, I have a problem using jqgrid and jquery tab (I am coding in asp.net mvc) I have two tabs. Each tabs should contains jqgrid with different data. I specify tabs as follows: <script type="text/javascript"> $(document).ready(function() { $("#tabs").tabs(); getContentTab (1); }); function getContent...

Developing ASP.NET MVC UI Extensions - best approach

What are the best practices in developing rich UI extensions for ASP.NET MVC (I mean asynchronous / partial loading, slick effects, skinning etc) ? I saw that Telerik has an MVC suite of extensions, but haven't tried them yet, so I cannot comment on them. My biggest concern as of the moment is how to structure the code of my extensions...

Autofac in Asp.net mvc 2

I want/need to compile autofac with asp.net mvc 2 website. I want to step thru the source to see how it works. But here is my problem. The binaries for mvc dll is apparently bound for asp.net mvc 1. I am having trouble working out what the settings for the project file need to be for .Net 3.5 and asp.net mvc 2. one is the NET35 directiv...

ViewContext.Writer() doesn't exist in ASP.NET MVC 1.0?

I have the following code in an ASP.NET MVC 2 application. internal TextWriter _writer; // some stuff _writer = _viewContext.Writer; _writer.Write(_tag.ToString(TagRenderMode.EndTag)); I tried to move it to MVC 1 and now it doesn't build any more. I'm getting this error: 'System.Web.Mvc.ViewContext' does not contain a definition for...

I need help solving a rather weird error in a WCF service.

Hi.. I have a solution that contains three projects. A main project with my MVC app, a silverlight application and a (silverlight enabled) WCF service project. In my silverlight project i have made a Service Reference to my WCF service. And i pretty much got that working. In my WCF service i have a method that returns an Book object, ...

How do I pass Url Parameters on a POST?

I have a controller method with the following signature: [AcceptVerbs(HttpVerbs.Post)] public ActionResult UpdateValues(int id, MyViewModel[] array) { } The id is normally picked up as part of the Url on other GET controller methods (I have a working route that does this) I am successfully passing the array1 from the form in my view ...

How to parse out MS Word formatting?

I have a rich html textbox on my asp.net mvc application. The rich html textbox is some jquery plugin that I use and has basic stuff like bold,underline and etc. Now I am anticipating that people will maybe write something in word and then copy and paste it into my textbox. However I limit the number of characters a person can have. Th...

.NET-MVC Modelbinder not binding because of primary key, all other fields are right. What's happening?

I want to perform an Add object scenario in .NET using the modelbinder. Function AddObject() As ActionResult Return View() End Function <AcceptVerbs(HttpVerbs.Post)> _ Function AddObject(<Bind(Exclude:="ObjectId")> ByVal o As BLL.Object) As ActionResult o.Save() End Function However, I get an error: 'o.ObjectId' is not de...

How can I use inline ASP.NET tags inside JavaScript?

How can I use ASP.NET inline tags from within a block of JavaScript? For example: <script type="text/javascript"> // Do some AJAX here, then redirect to a new page on the next line. window.location = "/Movie/" + <%= html.encode(MovieName) %>; </script> ...

Where is this port number http://localhost:52432/ specified when running an ASP.NET MVC app?

I'm playing around with ASP.NET MVC and I just loaded up an empty project and ran it and the URL in my browser is http://localhost:52432/. Where is the 52432 port number specified? Thanks in advance for your help, I'm going to start researching this question right now. ...

How to call stored proc from ASP.Net MVC stack via the ORM & return them in json?

Hi guys, i'm a total newbie with asp.net mvc and here's my jam: i have a 3 level list box which selection on box A shows options on box B and selection on box B will show the options for box C. I'm trying to do the whole thing in asp.net MVC and what i see is that the nerd dinner tutorial uses the ORM method. so i created a dbml to ...

ASP.NET MVC: How to allow some HTML mark-up in Html Encoded content?

Is there some magic existing code in MVC 2 to Html.Encode() strings and allow certain html markup, like paragraph marks and breaks? (coming from a Linq to SQL database field) A horrible code example to achieve the effect: Html.Encode(Model.fieldName).Replace("&lt;br /&gt;", "<br />") What would be really nice is to overload something...

Any idea how to use CodeCampServer template?

http://teamcity.codebetter.com/viewLog.html?buildId=11047&amp;tab=artifacts&amp;buildTypeId=bt21 CodeCampServer has two download packages: VisualStudioTemplate and CodeCampServerPackage. I looked for any idea how to use them, but unfortunately I didn't. So, I ask my questions here: How to use VisualStudioTemplate? the archive file di...

JQuery post not working when moving web-app to a win server 2003

I have build a webapplication using ASP.NET MVC and JQuery. On my local machine this works fine,but when moving it to a Windows server 2003 the JQuery method post stops working. I'm also using the load method and this works fine. function methodOne(id) { alert("debug1: <%= Url.Action( "MethodOne", "controller" ) + "/" %>" + id); ...

Spark view engine - why there is no VS integration in version 1.1?

I downloaded Spark 1.1 release from http://sparkviewengine.codeplex.com/releases/view/27601 and cannot find the msi package for Visual Studio integration promised in docs. Can anyone explain why? ...

ASP.Net MVC: Change Routes dynamically

Hi, usually, when I look at a ASP.Net MVC application, the Route table gets configured at startup and is not touched ever after. I have a couple of questions on that but they are closely related to each other: Is it possible to change the route table at runtime? How would/should I avoid threading issues? Is there maybe a better way...

ASP.NET MVC 2 asynchronous action with timeout

I want to write an asynchronous action in ASP.NET MVC 2 that waits up to 5 seconds for an event to occur. If the event occurs then the server responds with a result, otherwise the request times out. What is the best way to achieve this? ...

How can I present a Date & Time picker in Asp.Net MVC

I am trying to make a form field for a datetime property that allows the user to use a calendar for picking the date and also have something to choose the time graphically. I've managed to get the jQuery UI DatePicker working for the date, but I have not way of presenting the time. Is there a single component that does both? ...

How to use jquery ajax to set the content of a div, then call JS from that div

I'm using JQuery to load the content of an mvc usercontroll: function menuShowModal(a) { $.ajax( { url: a.href, success: function (result) { $('#modalDialog').dialog('close'); var $dialog = $('<div id=\'modalDialog\'></div>') ...

Asp.Net MVC 2 - Iterate Through Form Values In Model Binder

I have a list of items in my form which are named like this... <input type="text" id="ListItem1" name="ListItem1"> <input type="text" id="ListItem2" name="ListItem2"> <input type="text" id="ListItem3" name="ListItem3"> I want to create a custom model binder which converts these in to model with this structure... public class MyModel ...