In my ASP.net MVC application, I've got several views that I'd like to set to save in the browser's cache. I've got the methods built to do it, but here's my issue.
The menu in my site is different between logged in and logged off visitors. If the logged in page is cached, then even when the user logs off the menu remains in the logged ...
Hi folks,
I'm trying to create a route and then programatically retrieve the url of that route (so i can pass it to my jquery-rater.js code).
So, i wish to have the following url: /vote/create
The user will need to HTTP-POST to it. Posting the two values:
1. PostId
2. Vote Score (byte from 1<->5).
This is my route info:
routes.MapRou...
I have a versioned model:
public class VersionedModel
{
public Binary Version { get; set; }
}
Rendered using
<%= Html.Hidden("Version") %>
it gives:
<input id="Version" name="Version" type="hidden" value=""AQID"" />
that looks a bit strange. Any way, when the form submitted, the Version field is always null.
publi...
Hello!
I have a variable in javascript containing a string of XML data that I want to upload to a server running ASP.NET MVC.
It works just fine using jQuery.post method. My problem is that the data weights about 5 megabytes so this process could be rather long depending on the bandwidth available between the client and the server. As...
In a master-page, how can I know, which controller I am currently using? Is there some kind of context-object, that can give me that sort of information?
Standard menu
<ul>
<li>Fire</li>
<li>Ice</li>
<li>Water</li>
</ul>
Menu if I am in the water-controller
<ul>
<li>Fire</li>
<li>Ice</li>
<li class="selected">Water</li>
</ul>
If I...
I have two forms on one page: a results form and a search form. The search form uses a partial view because it is displayed on several different pages. I want to be able to persist the data in the search form regardles of which button on which form the user clicks. The problem is that when the user clicks on a link or button from the ...
I'm having trouble writing a unit test for one of my controller actions. Here's the details.
This view is strongly typed:
Inherits="System.Web.Mvc.ViewPage<IEnumerable<Request>>"
Here is the method in the controller under test:
// GET: /Request/List
public ActionResult List()
{
return View("List",
r...
Hi,
My JSON response looks like:
{rc: "200", test: "", user: "<div class='sub1'>
<div class='avatar'>
<a href='/blah'>blah</a><br />
<strong>0</strong>
</div>
<div class='sl'>
<p>
you d...
I have an ASP.NET MVC application into which I have just integrated the RPX third-party federated identity system. The integration is working ok, but I'm having some difficulty wrapping my head around what to do with it at the ASP.NET level.
Because the identity is handled externally, I have no need for passwords in my app: I never rec...
I have an ASP.NET MVC application into which I have just integrated the RPX third-party federated identity system. The integration is working ok, but I'm having some difficulty wrapping my head around what to do with it at the ASP.NET level.
I'm pretty new to ASP.NET (I'm learning it with MVC), and I've discovered a little bit about th...
Is there any way to use server controls in ASP.NET MVC?
Specifically I need to use the FarPoint Spread control in my application to display an Excel file that exists on the server with the ability to display updates on the client in real time.
The reason that I want to use MVC instead of webforms is that eventually we're going to scr...
I have 2 routes registered as follows:
routes.MapRoute("GetAnEmail", "{controller}", new { controller = "Home", action = "GetAnEmail" }, new { httpMethod = new HttpMethodConstraint("POST") })
routes.MapRoute("Home", "{controller}/{action}", new { controller = "Home", action = "Index" })
I have a valid unit test for the Home controller...
Hi,
Can anoyone lead me to code to implement autocomplete for a textbox
where the data comes from a database table server side?
This is in ASP.NET MVC application. Using SQL Server.
Malcolm
...
routes .Add ("Detail",
new Route ("{maincategory}/{category}",
new RouteValueDictionary (new { controller = "Category", action = "Detail"}),
new RouteValueDictionary (new { category = new FromValuesListConstraint ("")}),
new MyRouteHandler ()));...
LINQ default methods for insert/delete/update are coming disabled in visual studio 2008. The methods are grayed out (Use Runtime) and can't change to custom Stored procedures.
I am using ASP.NET MVC web application and LINQ to SQL. Any help will be apreciated. Many Thanks.
...
I'd like to edit an object like the one below. I'd like the UsersSelectedList populated with one or more Users from the UsersGrossList.
Using the standard edit-views in mvc, I get only strings and booleans (not shown below) mapped.
Many of the examples I find on google utilizes early releases of the mvc framework whereas I use the offic...
Is it possible to set a css class in a TextBox html helper?
This doesn't compile, obviously:
<%=Html.TextBox("Region",Model.Region,new {class="Autocomplete"}) %>
Thanks.
...
I have an MVC app with several <a> tags, and I want to have a way of tracking link clicks, preferably without doing redirects (i.e., without changing link addresses). Is there any way this can be done? And, if not, is there any way one can get this functionality automatically (e.g., with javascript)?
Thanks.
...
Hi,
I have a similar question like this, only then in ASP.NET MVC. Basically I have this route:
/{Controller}/{Action}/{Id}
I have a HTML form like this:
<form action="/Controller/Action">
<input type="text" name="Id" id="Id" />
<input type="submit" value="Send" />
</form>
The form is created like so:
<% =Html.BeginFor...
I have .ascx controls which I load on the page using renderpartial. I have need where in I want to hide some Div tag on the page where I am loading the control.
I added a Javascript to the .ascx file, but it seems that it does not get included in the page and hence I cannot hide the DIV tag when I load the control.
Any help??
...