Hello,
I'm struggling myself trying to find an easy way to change the DateTime format for my Table field.
I have a Model called Article with a field called releaseDate that is a DateTime
I managed to do it (visually) by converting the
Article.releaseDate.ToString("dd/MM/yy")
but the thing is when I try to submit a date with this f...
Hi,
Currently, I created my custom PerWebRequestLifetimeManager using HttpContext.Current.Items as backing store. I used that lifetime manager for Linq2Sql DataContext.
Eveything is working fine until I need to use Cache for storing data (for 5 min). After 5 min, I need to retrieve data from DB and put it into the Cache. To d...
I tried https://connect.microsoft.com before. First I was unsure if it is the right place, because you can not tell them, that you have a problem specific to ASP.NET MVC. I guess thats why I can only find 20 entries regarding ASP.NET MVC there.
What is the best place to report bugs / suggestions?
...
I got 3 html.dropdownlists out of which only for 1 its the setting the selectedvalue.How come its binding for one of the dropdownlist not for the other 2.In the Quick Watch,all the values are proper, it even shows which value has its selected=true. but in the page it doesnt get set.
Is there any solution for this?
Function Index(ByVal c...
Hi folks,
I'm trying to get the stock standard ASP.NET MVC (official release, version 1.0) to work/run. The trick? I'm trying to get it working under IIS7 instead of the built in Visual Studio Development Server (aka. Cassini).
What happens? It never goes to the default home page but to a LOGIN page.
Pre-info
OS = Win 7 RTM.
VS2008...
I would like to find a way to use custom User provider within a controllers ctor in order to not have to get the user on every method (dirty)..
This is what is in my ctor but keeps returning null?
Resource oResource;
public EntityController()
{
try
{
DataEntities oEntities = new DataEntities();
oResource = oEnti...
I got a ASP.NET MVC 2.0 Preview 1 app and started to create some areas which contains their own routes.
I want to have a way to overwrite these routes in the main project. I can of course not add a new route with the same name. I can see the RouteTable.Routes.Remove(RouteBase item) but not sure how to use it.
//Need to remove "PostInde...
I am doing some validation in the OnChanging event of Linq-to-sql model partila class and want to fire an error into my model. is this possible?
event code
> partial void OnCommissionStartChanging(System.DateTime value)
> {
> if (this.CommissionStart > this.CommissionEnd)
> {
> //add error to model or t...
I'm trying out sharp-architecture (and ASP.NET MVC) for a new project after being on the fringes of that community for a while and I'm a little confused. Following the standard entity template generation I created a class Message and I can list, create, edit and delete them.
I'm looking at the Edit(Message) action and just can't for ...
I'm likely missing something with json and javascript.
[{"commentText":"Testing 123","userPosted":"maxfridbe"},
{"commentText":"Testing 23","userPosted":"maxfridbe"}]
Sometimes I get multiple responses which works with this code:
function(data)
{
var sel = this;
jQuery.each(data,
fun...
I am implementing Repository Pattern with ADO.NET entity framework. I see that updating records is relatively more complicated than just adding or removing from the database. See below the Update statement and add statement for your judgment.
I was wondering if there is any way that I can update the record without having to retreive...
Hello There,
By any chance, is there any easy way to set a default MasterView for all the actions inside a specific controller?
For example If I have the HomeController I want all the actions inside it to inherit the Site.Master as default, but If I am inside AccountsController I want all the action to inherit the Admin.Master and so o...
private void EnsureCurrentlyValid()
{
//I'm valid if IDataErrorInfo.this[] returns null for every property
var propsToValidate = new[] { "Name", "Email", "Phone", "WillAttend" };
bool isValid = propsToValidate.All(x => this[x] == null);
if (!isValid)
throw new InvalidOperationException("Can't submit invalid GuestR...
I don't know what I am missing, and I don't know what else to read to get it right. I will try this gray question to see if I get closer to the solution. I am building a .NET MVC application.
This application is authenticating with OpenID using DotNetOpenAuth Library, all that is working ok. Once a user is authenticate I rebcord th...
I am building a web application using ASP.NET MVC that has two very distinct types of users. I'll contrive an example and say that one type is content producers (publishers) and another is content consumers (subscribers).
I am not planning on using the built-in ASP.NET authorization stuff, because the separation of my user types is a di...
Hi folks,
i'm trying to make my own ExceptionFilter. Out of the box, ASP.NET MVC comes with the [HandleError] attribute. This is great -> but it returns some html error View.
As such, I'm wanting to return some json error message. So i'm making my own.
Now, everything works great until i test my url. I keep getting an error. this is t...
Hello,
I'm aware that you can do this:
public ActionResult DoSomething([Bind(Exclude = "CreationDate")] Item item)
{ /*...*/ }
However, I found that you can also attach that Bind attribute on top of the method, e.g.
[Bind(Exclude = "CreationDate")]
public ActionResult DoSomething(Item item)
{ /*...*/ }
Does this have the e...
I'm trying to implement my own GenericIdentity implementation but keep receiving the following error when it attempts to load the views (I'm using asp.net MVC):
System.Runtime.Serialization.SerializationException was unhandled
by user code Message="Type is not resolved for member
'OpenIDExtendedIdentity,Training.Web, Version=1.0.0....
In asp.net mvc, you can easily call/add a controller from a view, but what is the easiest way to add child/subcontrollers from a controller. What Im getting at is I want to dynamically build a list of child controllers from within the controller itself, not from the view.
The pattern I have in mind is derived from the old ibuyspy porta...
hi everyone..
i'm just starting to use asp.net mvc..
since i'm not familiar with it, i just want to ask a question about actionlink html helper..
i have this code in my index.aspx home view..
<% Dim _news As datatable = ViewData.Model%>
<% For count As Integer = 0 To _news.Rows.Count - 1%>
<% Dim id As Integer = _news.Ro...