Since it's a lightweight JSONP callback to my site, I don't think there is a way to get standard Google Analytics tracking, unless I'm mistaken?
Otherwise I'll have to track on my own, inside my action (asp.net MVC 2 site), correct?
What sort of tracking would you do here?
...
I'm trying to get an autocomplete field firing in my asp.net mvc website. Basically the user types in their location and i go out to my db and pre-populate with country and postcodes that match.
The problem im having is that when the view load an error throws saying "Microsoft JScript runtime error: Exception thrown and not caught". It ...
I am currently hard coding the authorized roles in the filter in my MVC applications like so:
[Authorize(Roles = "Administrator,Manager")]
I'd like to eventually have a way to map the roles to each controller, so that the site admin can handle assigning what roles can perform each set of actions.
string roles = DoSomethingToGetAllowa...
Hi,
I'm writing an app and have come across caching problem which I cannot work out.
I have a default Home controller for the site which checks whether the user is authenticated or not.
If is not then LogOn View is displayed otherwise the client is redirected to another page.
Along with the LogOn view, also a Check cookie is being sen...
Hi guys i know this is a known problem in ASP.NET MVC, basically what i have here is a photo gallery with categories (Red, Blue, Green).
When i choose one category, say 'Red', it will do an ajax call and load the page with photos of red colored products. when i click one of the photos, i expect it to be enlarged (lightbox kinda effect)....
Hello,
i need to integrate http://www.ebookers.com/ booking system into my web page, unfortunately i've never done that before.
Would be glad to hear any advice how to accomplish this.
Thank You !
...
When I create a form to send data about new message:
<% using (Html.BeginForm()) { %>
<%= Html.TextAreaFor(m => m.Message.Text) %>
<input type="submit" />
<% } %>
I can't receive the message class in the controller:
[HttpPost]
public ActionResult NewMessage(Message message) // will not work, mes...
In my application I generated few url which contained " (double quotes), unfortunately.
I corrected the url's but google bot already indexed wrong urls.
Now I get quite often following exception:
System.ArgumentException: Illegal characters in path.
The only one place I can catch the error is the Application_Error in the Global.asax - ...
I have implemented an autocomplete in my app for zip codes. I am debugging in Firebug and I see in my console that the action is performing and I get a list of zip codes in the list of results, but the actual list is not displaying when I debug.
Here's the action in my Customers controller:
//the autocomplete request sends a parameter...
In my Index view I have the usual Edit, Details and Delete links. I've made icons for them, and since I use them everywhere I placed them in a Partial View.
Now, I do not have the feeling I'm doing it best practice here. So my question is: How to optimize it, or what should be different for best practice.
The Partial View:
<%@ Control...
Hi,
On one of my pages I display a datetime (from a database) and it is formatted correctly as a UK date time (dd-mm-yyyy) on my local machine. However when I deploy it to a server it reverts to American format (mm-dd-yyyy). Does anyone have any idea of when this might be happening?
This might be outside the scope of stackoverflow but ...
Let's say we have an ASP.NET MVC View like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%: Html.EditorFor(model => model.ServiceDate) %>
<%: Html.ValidationMessageFor(model => model.ServiceDate, "*")%>
and we have Model classes that are similar but not exactly the same, for instance Invoice an...
I want to pass multiple values to a controller. The controller looks like
Page(string type, string keywords, string sortType)
In a asp.net page,
I have
<%=Url.Action("Page", "Search", new { type = "new",keywords = keywords, sortType = "Date" }) %>
But the values for type and sorType are passed as null inside the controller.
Wha...
Say I want to send an email from my MVC application containing a link back to an item.
So I want something in my controller like:
string link = "www.mysite/mycontroller/itemdetails/23";
can I retrieve this programatically so it works on whatever server/configuration i happen stick it on?
eg
string link = GetCurrentActionRoute() + ...
I have a large asp.net project to which I want to add MVC functionality. I have added the necessary references into the project (System.Web.Mvc (v 2.0), System.Web.Abstractions (v 3.5) and System.Web.Routing (v 3.5) and amended all the required files (Global.asax (routing requirements), the web.config, project (Controllers and View fold...
I have 2 views, one to return all the locations belonging to a project, the other returns a json file containing the locations that used to show them on a google map.
Listing the locations works like this as the id is sent with the actionlink, but how do I send the project ID to the Map view?
public ActionResult GoogleMaps(int id)
{
...
Hi All,
New to MVC, worked a lot with asp.net but never used the built in membership , authentication, authorization stuff before.
I have 2 questions:
In the asp.net days i would store the logged in user details (username, first & last name, email) in a session (using a custom class) and just checked that the session["UserDetails"] !...
First of all , I use MVC 2 with Entity Framework 4.
I Have 2 Entities.
Customers and Emails
There is a Relation 1 to many between Customer and Email. One customer ca have many Email.
My question : In the Customer Creation page form, I have all the info related to the customer. ex:
<%: Html.LabelFor(model = model.FirstName) %>
<%: Ht...
From inside a viewpage, how can I reference the id from the url /controller/action/id without getting this data from the model?
...
I am looking for solution to a problem that I am having with resource files within ASP.NET MVC, I have tried a few different options in attempts to get this working but have so far been unsuccessful.
The desired configuration would be one where I can make resource files available for editing after a deployment. The solution we are putti...