Hey, all!
I'm going through a big refactoring / speed tweaking of one of my larger MVC apps. It has been deployed to production for a few months now, and I was starting to get timeouts waiting for connections in the connection pool. I have tracked the issue down to the connections not getting disposed properly.
In light of that, I ha...
Hi,
I'm getting weird error and I have no idea how to resolve it. I've got an ASP.NET MVC website which works fine but once I publish it to a server I get:
"Unable to load one or more of the
requested types. Retrieve the
LoaderExceptions property for more
information."
Stack Trace:
[ReflectionTypeLoadException: Unable...
I'm building a site using ASP.NET MVC, and I have partial views that use jquery to do various things. I was thinking of switching to google's ajax api and using their loader to load jquery. However, I noticed that I would no longer be able to use $(document).ready() anymore because google's loader specifies a callback google.setOnLoadC...
I am building my first ASP.net MVC application (not my first jQuery & jQuery Validation plugin application), and I am having a terrible time performing the client side validation with the validation plugin. Does anyone know if there is a problem using the plugin with jQuery-1.3.2.min that comes with VS 2008?
My code is as follows:
v...
I have a view with a form, when user submit the form, the matched action method is like:
public ActionResult Test(ViewModel vm, Member member)
{
//...
if (ModelState.IsValid)
{
try{
//...
member.OID = 1; //error here
//...
}Catch(Exception ex)
{
//...
}
}
}
It works...
I am following an example from another question for uploading with jQuery.
http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/
I would like to extend this a bit to add more data to the upload though, through other form elements. Any idea how this could be done?
...
I have MVC html control for radiobutton like:
<%= Html.RadioButton("Choice", false, new { onclick = "Accept()" })%><label for="Choice">Yes</label>
<%= Html.RadioButton("Choice", false, new { onclick = "Deny()" })%><label for="Choice">No</label>
How to get radio button selection with JQuery?
...
I was following the example laid out here for implementing AJAX panels in MVC. I'm using VB.NET, but the conversion is pretty straightforward. However, I can't seem to get it to work, and I'm running out of ideas as to why. Here is my code:
HomeController:
Function Index() As ActionResult
Return View()
End Function
Function Archiv...
In my Application_Error event handler i want to render an MVC-View for 404. I do not want to redirect because of SEO.
void Application_Error(...)
{
if (serverException is HttpException && ((HttpException)serverException).GetHttpCode() == 404)
{
Server.Transfer("/error/404"); //*
}
}
//* Fails, because it cannot find the path on d...
How do I access a lazy loaded property of an ActiveRecord model from within the view?
I have a news model that Belongs to a Category Model, both of which are marked as Lazy=true
I'm able to access a lazy loaded property in my view by doing the following in my controller
using (new SessionScope())
{
results = _service.FindAllNews(s...
when posting back to my controller my model is populated with correct valeus and my string filed has the file name, but the Request.Files is empty.
My input at the view is:
<input id="SitePlan" name="SitePlan" type="file" value="<%= Html.Encode(Model.SitePlan) %>" />
My form tag begins with:
<% using (Html.BeginForm(new { enctype =...
I'm doing in-line edits on a grid, but can't seem to get any events to fire that would be tied to that edit.
Here I have afterSubmit: and I want it to fire after the user has edited the Quantity field in the grid, but it never fires.
$('#tblLines').jqGrid({
url: createUrl('/CRA/GetLines/'),
editurl: '/CRA/EditModifyLine...
Hi
I'm looking for a good solution to pass two generic objects to a viewpage like ViewPage
The view should render a Customer, and the SomePresentation holds data used in the view, could be a list of cities where a customer holds one city.
I don't want to use ViewDate["somedata"] for various reasons. So if anybody has a solution to g...
I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server. This sets up the authentication and authorization for me. However, I have other person-based data that I need to track as well, such as the person's phone number, department, their charge-out rate, start date, etc.
WHAT the person can do (which is contr...
I was wondering if you could show me all the various ways to declare routes in ASP.NET MVC (1 and 2). Please explain each method of defining a route, how it is used, and what case it covers.
Here is an example of what I am hoping to collect here:
routes.MapRoute("Directors",
"Directors/{filter}/{skip}",
new { controller = "Dir...
i have a database table of website links. i have another table of tags, and tagmap (bridge table)
I am displaying a list of links in a view and on the right hand side i have a list of tags (similar to SOF). A link can have many tags.
when i click on a tag, i would like to refresh the link list with just links filtered by that tag.
I ...
i have a database of links and tags.
what is the easiest way i can display this as a tag cloud?
...
I have a POST controller action like:
if (ModelState.IsValid)
{
try
{
//.. save and redirect code here
}
catch
{
//.. add errors to model state
}
}
return View(myModel);
My request.files can contain 2 images from tags like:
<input id="MyImage" name=...
I have a MVC app that works fine before. but it did not work any more with no change. Pretty confused.
My view has follwing hyperlink for data input validation:
<span><a href="#" id="validate">Verify Input</a> </span>
the validation code is:
<script type="text/javascript">
$(function(){
$("#validate").click(function(){
...
Where can I find some asp.net MVC introduction articles/tutorials.
...