asp.net-mvc

Incorporate Membership in ASP.NET MVC

I have been wondering on how to use ASP.NET Membership together with MVC. The basic setup is very simple, but if I want to use extra fields like address, nickname etc, should I then use ProfileCommon or should I create a separate table which contains the extra data and link to the UserId in Aspnet_users? I have an issue where I have cha...

JQuery $.ajax Request works in IE but not FF and Chrome

The following JQuery Request works fine in IE but not in FF and Chrome. I am running the following page from its file location e.g. file:///C:/Test/json.htm and requesting a page running on localhost. What is the reason for this? And how can I get it to work for FF and Chrome? <body> <input type="button" value="Search" id="search-bu...

Dealing with '/'es in links

I am reading in a number of strings which have /'es through them, the most common example being dates/numbers like 05/06, 07/08, etc. I am using ASP.NET MVC2 and generating links off of these strings read out of DB, which therein lies the problem. Obviously a link to: www.mysite.com/yearperiod/05/06/detail will not work the same as a...

Module level code packing or installation in ASP.NET MVC

hi, We have a list of modules in an ASP.NET MVC site. We have a scenario to deploy the web site module wise. We restructured our code to have different namespaces for each module. How is it possible using installer to restrict module level installations? It is just like having feature based installation at par with Microsoft Products....

ASP .NET VirtualPathProvider HttpCompileException

I have a VirtualPathProvider that is loading my aspx file content from a DB. All seems to be well and good except when my aspx file has a reference to a namespace or assembly that is not explicitly mentioned in my web.config. The solution seems easy right? Add assembly and import directives to the page... But that doesn't seem to work. ...

How to organize views, partial views and their view models?

I'm developing in asp.net mvc2. I am beginning to create a lot of views and partial views, for most of which I've had to create a view model. This is looking like soon it's going to become unmanageable to remember what view goes with what model. I've tried to use inheritance in my view models as much as possible. I'm wondering how other...

How to pass JSON to webpage on load of page?

Hi I have a ASP.NET MVC 1.0 app. I have a listbox on the page and I want to pass an array to the webpage so that javascript can use the array to do some processing depending on the item picked in the listbox. So I thought the best way is to pass JSON data to the webpage on load. So what is the best practice on how to do this? Can y...

unload event when using master page.

In my project i have used master page.In one particular page , i want a function to be executed on page unload(javascript event) event of that particular page.To achieve this i have written $('body').bind('unload',function() { alert('hello'); } ); But this is not working.This function is not getting called when i m...

Prolem in Telerik extension for export

Hello, I have found the code to take the export to csv at one of your web documents. Below is the link : http://demos.telerik.com/aspnet-mvc/grid/customcommand. I have implement same thing in my code to take export, and it is working, But when I filter the grid with option like column name "Name" then in grid the resultant view show th...

How to run the site from development machine directly on production server without compliing.

I have a site developed in asp.net mvc.Is it posssible to run the site as developed on the developing machine directly on the production server without compilation i.e. in the bin folder I will only have the external dll that will be needed and not the project dll. I will be using SVN:commit the code from the development machine and tak...

ASP.NET MVC rendering partial view with jQuery ajax

I have a controller action which renders a partial view: public ActionResult Details(int id) { DetailsViewModel model = ModelBuilder.GetDetailsViewModel(id, _repository); return PartialView("Details", model); } and I'm loading the returned content into a dynamic element as follows: $container = appendContainer(); // ...

read current culture of asp.net mvc project and change language in javascript confirm

I have a javascript confirm. My text is in english, but if I will change language/culture of my asp.net mvc project confirm is of cource still english. I can controll it manually and just write two javascript methods (for both Languages) but it is no so clean I think. And if I will have more than 3 languages its will be more dirty. Co...

SubSonic 3, Entity Data Model (Entity Framework) or LINQ to SQL for ASP.NET MVC development?

Having used all of them (some more than others), I am still undecided on which could be the best to use (with .NET 3.5). What are the pro's and con's of each when developing? SubSonic 3 Not enough samples/documentation (I know its a wiki and people can update it, but it can be tricky to track things down - e.g. where are the sample apps...

How to navigate to different Silverlight Control in Facebook Canvas ASP.NET MVC Application.

In my Facebook Canvas application i have the following problem: The Facebook application is running in an iframe inside Facebook. Basically it is an ASP.NET MVC application with two different silverlight apps nested in two different Views(and different controlls) If the user is in one silveright control the user should be able to navi...

Asp.net MVC Hosting - SQL Server

So I'm moving my Asp.net mvc web app over to Arvixe shared hosting. This is the first time I've deployed an MVC app. I have been using SQL Server 2008 Express for the development database. Arvixe provides SQL Server 2008 or MySQL hosted databases. A couple questions: 1.Can I use the mdf files from my Express database with the new No...

Invoking an action using jquery ajax

I am using ASP.NET MVC 2. I have a modal dialog (done through jquery UI) that contains two text boxes and a button. All the controls are inside a form. I would like to invoke, when the user click the button, a controller action that do some operations on the passed data contained in the two text boxes and then return an integer value an...

How to remember a action from a user(Like them thumbing or star rating)?

Hi I am just wondering on how sites do "ratings" or "thumbs up". I figured that each of the thumbs up would have a special id that would correspond to some value in the database that would store the total count. However what I am unsure of is how people make it the user can only click on it one. Like if hit thumbs up they can't keep s...

asp.net mvc 1.0 Validations

Im working in asp.net mvc application which was done in mvc 1... so validations were done following the nerd dinner 1.0 tutorial I just defined a rule like this public bool Is_CellPhone(string val) { Regex celular = new Regex("^04[12][246][0-9]{7}$"); return celular.IsMatch(val); } and ...

Best practices with ASP.NET MVC view models

I ask myself how do I create a view model correctly. For instance, I have an edit view with some text boxes and a dropdownlist. Should I separate the dropdown list into a new view model or shoud the edit view have one viewmodel with a list for the dropdownlist? Or generally speaking, should I separate special input fields in separate ...

special characters in url give "Bad Request" or "Illegal characters in path"

I'm using javascript to request a image generated by the server in real time. The parameter is passed in the url and grabbed by MVC, and set in the "id" parameter to the controller. Like this: Public Function Index(ByVal id As String) As ActionResult This works fine if i dont use any special characters, like "?" or quotes. To send t...