Hi All,
I've found a couple of posts that describe similar scenarios to mine but nothing that has the same concept or has been resolved so I'm sure I will get complaints about this question but I still want to ask it so some of you more knowledgeable than my self can give me some advice.
My problem is hydrating a Viewmodel from a Lin...
Hi,
i was wondering about the following:
i can define in IIS what to do with page not founds / 404, and also in my app i can put it in my CustomErrors section or just handle it in code.
Now as i assume IIS always gets the request first, when does it handle the 404 for itself, and when does it let it pass through to my app?
And a side...
In my latest project I have to use strongly typed DataSets. I have a problem submit a form to a POST controller: I get an parameterless constructor error i.e. it does not found
the OrderCreate post method on controller. I will appriciate any help. Thank you.
Here is my simplified code:
View:
<%@ Control Language="C#" Inherits="System....
I'm using jqGrid to display some data on a page. Within the controller action, we're using an anonymous object to represent the data that the jqGrid needs. My question is, is there a way we can create a strongly typed object to represent the jqGrid data that we are sending with Json()?
Main reason for this is so that we can do unit te...
I have all this JSON text that I want to deserialize (or something) into an object with variables so I can run through it and add/change some things and then serialize it back to text. Is there something built in from Microsoft for this?
...
Hi,
what i am trying is the following:
I got an MVC app. running DIRECTLY in "Default Web Site"...
I got another app. ( ProductionService ) which is anotehr standalone app..
Looks like this in IIS-Manager:
My problem is, that a requets to "ProductionService" is not routed to the app., but instead is handled by the MVC-app. runnin...
I have an existing table that has 100 users and passwords. The data type is a varchar.
I just created an asp.net mvc application and I want to convert the password to aspnet_membership table.
How do I convert varchar password on SQL level as "Password" and "Passwordsalt" in aspnet_membership table?
...
I have the following function signuture:
public JsonResult PopulateGrid(int page, Guid? accountId, Guid? systemUserId, Guid? branchId, DateTime? fromDate, DateTime? toDate, HomeVisitType? homeVisitType)
Every single parameter is bound just fine except toDate which turns out to be always null.
When inspecting the Request.QueryString["t...
Is ASP.NET MVC 2 vulnerable to the oracle padding attack? If so, what workaround should be implemented? The instructions on Scott Gu's blog appear to only be for Webforms.
I tried this:
<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="/Home/ErrorPage" />
however, http://www.example.com/PageThatDoesNotExist ...
I had my ASP.NET MVC actions written like this:
//
// GET: /TaxStatements/CalculateTax/{prettyId}
public ActionResult CalculateTax(int prettyId)
{
if (prettyId == 0)
return Json(true, JsonRequestBehavior.AllowGet);
TaxStatement selected = _repository.Load(prettyId);
return Json(select...
Hello Friends,
I am using this ccode right now..
<%using (Html.BeginForm("SaveNewServiceTypeCategory","ServiceTypeCategory")){ %>
<table>
<tr>
<td>Service type category:</td>
<td style="padding-left:5px;">
<input type="text" id="txtNewServiceTypeCategory" name="txtNewServiceTypeCategory" ...
I would like the MvcContrib select control to be highlighted in red, but currently I can only show the error text.
I currently populate security questions in the view:
<%= this.Select(Html.NameFor(x => x.Question1).ToHtmlString())
.Options(Model.AllSecurityQuestions, x => x.Id, x => x.Question)
.Selected(Mode...
In my View (.aspx) code, what parameters can I provide to Html.BeginForm() in order to get it to submit back to the same controller and action that produced the view?
...
Hello Friends,
I have this code
viewModel.Messages = repository.GetAllMessages().OrderBy(x => x.MessageText);
with this I am getting 75 messges and i am displaying all the Messages in the Grid with two columns
MessageText and MessageType
But I need to write a Linq Query to get all my Distinct MessageTypes from Messages?
Can any ...
Hi.
On one of my models I have a property annotated with:
[StringLength(60, ErrorMessage="Title must be between 60 and 10 characters", MinimumLength=10)]
When the form posts to the server, if it's under 10 characters, then validation fails as it should do. However, on the client-side, it only checks that it's under 60 characters -- n...
I believe that I'm going to need to use an html helper method that uses lambda expressions to accomplish this.
I was thinking of doing something along these lines:
public static MvcHtmlString GetCategoryBreadCrumbs<T>(
this HtmlHelper html,
IEnumerable<T> currentCat,
Func<T, T> parentProperty,
Func<T...
I'm on a .NET MVC2 project and have a reference to SomeClass.Home.js and jquery in the masterpage. My SomeClass.Home.js looks like this:
SomeClass.Home = {};
$(document).ready(function () {
SomeClass.Home.SomeMethod();
});
SomeClass.Home.SomeMethod= function () {
alert("hello");
};
The call to SomeClass.Home.SomeMethod ...
I have MVC application (applies to non MVC as well) where a user is posting in data. I need to take this data, send it off to two seperate end points (one using a WebRequest form POST and one using a Web Service), parse the result, and send the result back to the original user.
The issue at hand is that both end points take about 20-30...
A simple task in MVC,sometimes becomes a hard challenge.
Well,i have an Area called Admin.I've a page named "Forbidden" inside the Shared's directory in this area.
The goal is simple:I need to create an Html.ActionLink that generates a link to return to Home page which is OUTSIDE the Admin area.
So i try,<%= Html.ActionLink("Back","In...
After rendering a view on a Post, a call to RenderAction inside the view will call for the Post method. Is there any way to specify I want to call the Get method instead of the Post?
...