Hi,
I'm trying to execute a Redirect from a method attribute. It seems to work:
public class MyAttribute: ActionFilterAttribute {
[..]
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
[..]
filterContext.HttpContext.Response.Redirect(urlToRedirectTo, true);
[..]
The onl...
Hi,
At the moment we're evaluating whether it's worth it to start using ASP.NET MVC in combination with Visual Studio 2010.
I've been searching the web for experiences developers have had with working with ASP.NET MVC. I can't seem to find any. So I decided to post a question here.
Are there any people out there that have used ASP.NE...
I generated a View using VS 2010 functionality. This auto code generation created this code:
<%: Html.TextBoxFor(model => model.DateDeleted, String.Format("{0:g}", Model.DateDeleted)) %>
I created a custom helper method (extension method) to create a JQuery Calendar control. This is the syntax for this control on the View:
...
i can open a page (view) in browser using the address http://localhost:1234/Home/Details/id
What settings i need in global.cs so i can open the same page using
http://localhost:1234/Details/id
...
Hello stackoverflow world.
(This is the first time I actually post a question here. Exciting)
A while ago I inherited a 2 year old MVC website from one of the teams within my corporation. I know most the ins and outs of this solution now but there is something strange cropping up in my error logs which I do not understand.
Every now a...
I'm trying to show a detail partialview using ajax and colorbox. It's working fine but only the first time. After that GetGraph is not run and the first image is displayed again. If I reload the entire page it's working one time again. The detailinfo is updating OK it's just the chartimage that's not working.
Somewhat related question
...
I have a multiselect listbox with several different values, when a user selects values from first listbox another multiselect listbox gonna be populated with different values depending on the first listbox values.
So far everything works as expected.
The problem is that i'm using a jquery plugin called dropdownchecklist that transforms...
I want to call a method in C# from a client side AJAX/JQuery message.
The client code is:
function TestClickFunc(userId) {
$.ajax({
url: "/Users/UpdateEmailDistributionListFlag",
type: "POST",
data: { "userId" : userId },
success: function (data) { ale...
I would like to load data in a table but I would like to do this after the page loads. The actual page has a table, a textbox, and a search button. I was thinking ajax would help, but I am yet to find a good solution for my problem. How do I do this? Javascript, Jquery or otherwise.
<table class="roundAll" >
<tr class="titleRow">
...
In the NerdDinner MVC app demo, there is confirmButton defined when setting up ActionResult Delete:
public ActionResult Delete(int id, string confirmButton) {
What is confirmButton for, as it is not used in the code? I assumed it returned the name of the submit button that was clicked, but it is just a blank string. How can you get wh...
How can I easily use two different databases for debug and release scenarios?
I don't want to need to remember to change the data source connection strings every time I publish a new version of my application but I also don't want to test new code on the working database ...
Is there something like a debug / release switch?
...
I am trying to get my head around MVC at the moment.
What I want to do is this;
function TestClickFunc(userId) {
$.post("/Users/UpdateEmailDistributionListFlag", { id: userId });
}
However I cannot use JQuery directly in a javascript method like this.
I have been hunting around for examples, but now I need...
Hi i have an entity called User with 2 properties called UserName and Role (which is a reference to another entity called Role). I'm trying to update the UserName and RoleID from a form which is posted back. Within my postback action i have the following code:
var user = new User();
TryUpdateModel(user, "User", new string[] { "UserNa...
Hi,
I am a bit confused on how ASP.NET session works with my site, when a user opens up the site in multiple browsers, and/or multiple tabs.
I see that after logging in with IE, i can open a new tab and not have to log in, and that if I log out of one tab, the other one will redirect to login after I try to do something.
I also notice...
I would like to call my JsonResult after a pageload, not on a submit button. I have two BeginForm functions.
$("#loadTableForm").ready(function() {
//$.post($(this).attr("action"), $(this).serialize(), function(response) {
});
<%using (Html.BeginForm()) {%>
//data
<%using (Html.BeginForm("LoadTable", "Home", FormMethod.Pos...
I have an ASP.NET MVC application running on IIS6 with enabled wildcard mapping. After performing some load tests I digged into log files with focus on the slow requests. I have a log file from the load testing application, IIS log file and the log file from the IHttpModule I develop for this purpose which records time of Application.Beg...
I am wondering if it is possible to open a view in a new window but without the masterpage defined in the header? would I just define a separate view? or is there a better way?
thanks!
...
I've been reading a lot on TDD over the past few months and decided to jump in and try it out with an easy example, I'm just not sure I'm testing for the right things in practice. Here the tests for a custom Data Annotation for validating emails:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using...
Hi,
I have a jQuery dialog showing a few items, with a link to open the item's order information in another window. This works fine on a regular view, but when I use target=_blank on a jQuery modal dialog, it does not open another browser window and instead navigates the page under the dialog to the URL.
Any ideas how to work around th...
Dear SO surfers,
<ul>
<li><% Html.ActionLink(StringHelper.TryGetLocalString("Something"),
"Blah", "Blah"); %></li>
</ul>
I had tp make the StringHelper class above public before I could see it from within my partial view.
Why??
(side note: resolving to local string will be done in my controller not in the view (layout) ...