I am used to using "changed_at" fields in my MySQL database that Ruby on Rails automatically updates when changing a record.
Now I am using ASP.NET MVC with SQL Server 2008 and I am wondering, how would I proceed to get the same functionality. Does SQL Server have an option for auto updating a field when updating?
...
I need the ability to dynamically set an onclick using an HTML Helper. the below is what I'm trying to do, but i'm getting an obvious syntax error
<%=Html.CheckBox("checkboxname", item.Id = 3, New With {.onclick = "ajaxThis(this, <%= Html.Encode(item.ID) %>, '<%= Html.Encode(item.NUMBER) %>');"})%>
...
This code fails to actually save any changes:
//
// POST: /SomeType/Edit/5
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Guid id, SomeType Model)
{
db.AttachTo(Model.GetType().Name, Model);
db.ApplyPropertyChanges(Model.EntityKey.EntitySetName, Model);
db.SaveChanges();
return RedirectToAction("Index");
}
ASP...
I have a double-precision floating point field in my database that stores seconds past midnight. I have code in c# that can convert this number to the form HH:MM:SS.ffffff, where f is fractions of a second. I also have code that can parse this back into a double.
What I would like to do is modify the stock binder object in ASP.NET MVC...
hi i have a master page in MVC with multiple contentplaceholders for example:
news list, basket preview, offers etc. and these things i want to be throughout the application, but this is my first MVC application and i was wondering if you guys have some sound advice on how to tackle multiple content, from multiple (pages/code) without h...
I need to learn and adpot the MVC methodology for building web apps. Which is the better way to go given that I have experience with ASP .NET Webforms - ASP .NET MVC or Ruby on Rails?
I've heard people going gaga over RoR and its simplicity and its features such as scaffolding, ActiveRecord, convention over configuration etc.
However,...
Ok, so I'm new to ASP.NET MVC and JQuery.
I have followed the following example to the letter, and I'm not able to get the datepicker working:
http://codesprouts.com/post/Creating-A-DatePicker-Extension-In-ASPNet-MVC.aspx
Can anyone tell me if there are any ticks or gotchas with this?
Bernard.
...
I have one table structure Like
1)Id
2)Date
3)score
Filtered by date, I can show number of rows (Display field: Score).
and on one page I what to show records of 3 dates (3 consequent dates, Stored in tables).
Format should look like....
Date1 Date2 Date3
score score score
score score score
score score score
.....
a) At the moment I have a deployed app on live on asp.mvc beta ... but few days ago it refuses to work with following error:
Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.RouteLink(System.Web.Mvc.HtmlHelper, System.String, System.Web.Routing.RouteValueDictionary, System.Web.Routing.RouteValueDictionary)'.
Version ...
Has anyone written one? I want it to behave like a link but look like a button. A form with a single button wont do it has I don't want any POST.
...
How would I go about using the MVC framework in the ASP.NET standard web site model, instead of the web application model?
...
Hi,
I need to be able to edit a table of data in the browser.
I have seen in MVCContrib there is a HTML helper to render out a table. Useful... but what about if I want the user to be able to edit that table? From what I can see it does not help there.
What is the best way to approach this?
Traditional FORM with a TABLE inside? If so...
I am in the planning phase of a new ASP.NET MVC application and one of the requirements is storing some user information that is not part of the standard set found in the User class that comes with ASP.NET MVC. I suppose it comes down to two questions.
1) Can I edit the class that is being used already to store the information that I ne...
Is there an updated list of the UI Helpers for ASP.NET MVC? I can only find documentation of beta version stuff. I have the source, and I will probably end up looking at that anyway, but it would be nice to have a run down.
...
I want to trigger the change event of dropdown in $(document).ready using jquery.
I have a cascading dropdown for country and state in user details page. how can i set the value (which is taken from DB based on the user id) for country and state in MVC with C#.
...
Hi guys,
I'm building a grid in ASP.NET MVC and I have the following issue:
Above the grid i have a column selector which lets people customize the columns being shown. This is a form with a submit button so that people can add/remove multiple columns at once without going trough multiple postbacks.
Below the grid I have paging. This ...
Hi Folks,
based upon an answer from this SO post, i'm trying to tweak it a bit so that i don't need to hardcode the route and route params, but instead (if possible) use a strongly typed controller action method:-
string path = RouteTable.Routes.GetVirtualPath(
new RequestContext(HttpContext,
RouteTable.Route...
How to handle invalid URLs in MVC?
For ex.: When the user enters http://localhost/User/MyProfile instead of
http://localhost/User/Profile, it will throw an exception.
How to handle this request?
...
In C# with MVC, i want to write a common utility or class in which if a particular conditoin fails need to redirect to login page.
For ex.: When the user logged in to the website, userid will be added to session. To Access the "ManageUsers" page, the user should be logged in as admin, else i need to redirect to Login page. i need to che...
I am working with a paginated list like in the NerdDinner sample.
I am trying to show the navigation buttons for forward and back. I want there to be a form post
when these are clicked so that the search text is still passed in.
The problem is, the search text is stored in a form that is outside the partial view that the paged list is...