Hi guys,
I'm currently developing an image viewer using asp.net MVC. The image viewer itself works as a charme, but I'm not happy with the caching.
To explain: I'm using the GeneratedImage (http://aspnet.codeplex.com/releases/view/16449) in order to produce the thumbs, but the Server Side Caching is only limited to 5 Minutes and can't ...
Hi,
i have the sql server database , that is having the table User. I want to create the user through the asp.net MVC application. I have the application based on asp.net MVC 2 version.I have added the controller as UsersController, also creates the view as Users. The UsersController having the methods Create, Index,delete..so on..
To ta...
Hi All
Would anyone be able to advise if it’s possible to re-use an existing HtmlHelper within a new custom Html helper. For example:
public static class GridHelper
{
public static string RenderGrid(this HtmlHelper helper, Object routeParams)
{
return HtmlHelper.BeginForm(routeParams);
}
}
The above is a...
using data source we can show the data in web page. but i want that there is radio button with all rows and after accessing the radio button the given functionality works?
how to do it please explain?
...
Hi,
I just published a website in vs2008 and FTP it to the live site and there is an error where some of the files are pointing to the dev server??
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the cur...
Among other things I have this html content in my content page:
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
$("[ID$=panelDetail]").dialog({
autoOpen: false
, resizable: false
, height: 'auto'
, width: 'auto'
, modal: true
...
I find myself pasting this code over and over on many views that deal with forms.
Is there a simple approach to refactor the following markup from a view in MVC2?
The only changing part is the route for the cancel link (LocalizedSaveButton and LocalizedCancelLink are helper methods I created).
I tried extracting it to a PartialView but I...
I'm handling errors in ASP.NET MVC by sending an error id from Application.OnError to a controller action, by adding a route data value that gives the error id:
Global.asax.cs/OnError:
var routeData = new RouteData();
routeData.DataTokens.Add("errorKey", errorId);
var context = new RequestContext(new HttpContextWrapper(Context), route...
Hello,
I am using PartialView object for all the CRUD operations in my project.
I would like to return from more than one action (Create/Read/Edit) always the same PartialView that I have previously binded to the correct model object.
How can I achieve this?
Thanks
...
I am doing int like this:
Hello <%= Html.LabelFor(user => user.UserName)%>
But iam getting not a value which is in Property but something strange like this:
Hello User Name,
How can do it to give some value in label out?
...
I'm specifically interested in ASP.NET or ASP.NET MVC as the platform, but any contributions for the good of the community are welcome irrespective of platform!
As such, there is no one right answer - hence it's a community wiki.
We don't want to reinvent the wheel, and building a GUI to filter the data seems like overkill.
Is Repor...
I'm trying to get the current Route into my navigation controller so I can run comparisons as the navigation menu data is populated.
My Links object is like this:
public class StreamNavLinks
{
public string Text { get; set; }
public RouteValueDictionary RouteValues { get; set; }
public bool IsSelected { get; set; }
}
In t...
I would like to create simple controls that can be Easily reused across applications. Is there a current set of best practices or patterns for creating such controls. Examples of such controls could be Paging, List or Grid display, etc...
I'm not looking to make controls with tons of options just really simple controls that I can add t...
There is this one action that is requested using javascript during the loading of a page, it takes over 25 seconds to resolve. Looking at the code makes me think there is a scaling issue, but I am wondering if there is any way I can step through the code during the request so I can see what is happening. I try clicking 'debug/start debug...
Since I'm having problem with unit testing RenderPartialViewToString() with Moq framework (http://stackoverflow.com/questions/3621961/asp-net-mvc-unit-testing-renderpartialviewtostring-with-moq-framework), I'm thinking about getting my controller directly, without using Moq for these particular test, however, how do I mocks (or set) the ...
Hey guys,
So I have an .aspx page loading up and populating drop downs based on a lookup table in the database. What we want is for the user to be able to configure which of these values comes defaulted by specifying that value in a drop down somewhere else in the app.
Now, it's easy to default the "first" value, or something like that...
I have seen many questions raised around PartialViews and Javascript: the problem is a PartialView that requires Javascript, e.g. a view that renders a jqGrid:
The partial View needs a <div id="myGrid"></div>
and then some script:
<script>
$(document).ready(function(){
$('#myGrid').jqGrid( { // config params go here
});
}
</sc...
I have the following code:
<div class="editor-field">
<%: Html.TextBoxFor(model => model.MyId) %>
<%: Html.ValidationMessageFor(model => model.MyId) %>
</div>
The 'MyId' property of the model is of type integer.
When the form is in 'Create' mode, MyId value is 0. How can I, prevent 0 displaying and rather render the textbox with an...
The first submit works as expected, but the next time it's fully posted back. I'm using jQuery.form plugin, specifically the .ajaxSubmit(options) call to submit the form. There are a couple levels of wrapper div's, but I debug the button.click binds and I can't figure out why the second time, even with the same variables, it does a full ...
Hello
I am using ASP.NET partial views like in this example
<% using (Html.BeginForm()) { %>
<table cellspacing="2" cellpadding="0" border="0" width="100%">
<tr>
<td><%= Html.LabelFor(model => model.PersonName)%></td>
<td>
<%= Html.TextBoxFor(model => model.PersonName)%>
<%= Html.Validati...