Search

You searched for the word(s): userid:302241

Matching Posts

  • MultiSelectList doesnt make items selected

    Hello I have a problem with a multiselectlist, if I hover dropObjectcategories in debug-mode it contains 4 items that should be selected. List<int> selectedObjectcategoryIDs = new List<int>(); foreach (Objectcategory item in bo.Objectcategories) { selectedObjectcategoryIDs.Add(item.ObjectcategoryID); } MultiSelectList dropObjectcategories = new MultiSelectList(_bs.GetObjectcategories(), "ObjectcategoryID", "ObjectcategoryName", selectedObjectcategoryIDs); still it
    Posted to ASP.NET MVC (Forum) by Svevarn on 11/23/2009
  • Simple route doesn't work

    Hello I have a simple route like this in my global.asax.cs: public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Views", "View/{RouteID}", new { controller = "BookingViewsPublicController", action = "Index", RouteID = "" } ); routes.MapRoute( "Default", // Route name "{controller}/{action}/
    Posted to ASP.NET MVC (Forum) by Svevarn on 11/13/2009
  • If IQueryable contains in model?

    Hello I have this loop that renders a schedule with checkboxes for each entry like this: Monday Tuesday..... 08:00-09:00 [ ] [ ]... 10:00-11:00 [ ] [ ]... Using this code in my view: <% for (int i = 1; i < 10; i++) {%> <tr> <td> xx:00 - xx:00 </td> <% for (int currentDay = 1; currentDay <= 7; currentDay++) { %> <td style="text-align: center;"> <%=Html.CheckBox("TimeRange" + currentDay.ToString()) %> </td> <%} %> <
    Posted to ASP.NET MVC (Forum) by Svevarn on 11/10/2009
  • Rendering a schedule dynamically with help of mvc

    Hello I'm trying to build a simple "schedule-admin" using mvc 1.0 and entity framework, where the admin can weekly set which hours should be avalible for class (read: schoolclass) using checkboxes. (and I cant use jquery thingies in this project) Visually it should be like: Monday Tuesday Wednesday Thursday ............. 08:00-09:00 [ ] [v] [v] [v] ............... 09:00-10:00 [ ] [v] [ ] [v] ............. I know the following data: Which week (startdate and enddate, mon-sun) Interval
    Posted to ASP.NET MVC (Forum) by Svevarn on 11/4/2009
  • Extending with filter queries with entity framework

    Hello I have 3 tables in my testdatabase, Customers <-> CustomersUsergroups <-> Usergroups For customers I have a method that returns all Usergroups like this: public IQueryable<Usergroup> GetUsergroups() { return from ug in _entities.UsergroupSet.Include("Customer") select ug; } And to that I have a "filter-class" for class Usergroup public static IQueryable<Usergroup> ByUsergroupID(this IQueryable<Usergroup> qry, int usergroupID) { return from ug
  • MVC wysiwyg editors?

    Hello I was wondering if there is some editors such as the Telerik Editor that is more suited for MVC applications, or are they all "compatible"? And in that case what makes it "MVC-compatible"? I have Pintexx editor atm and apparently it doesnt support that, atleast they say in their forums. /S
    Posted to ASP.NET MVC (Forum) by Svevarn on 10/6/2009
  • Accessing referenced table with Entity Framework

    Hello I have problems accessing data from referenced table using entity framework in my mvc-application. In my view I have: <% int counter = 0; %> <% foreach (var item in Model.BookingViews) { %> <tr class="<%= (counter % 2) == 0 ? "tablerow" : "tablerowalter" %>"> <td><%= item.Customers.CustomerName %></td> <td><%= item.Lastmodified %></td> <td><%= item.Datecreated %></td> <td>...<
    Posted to ASP.NET MVC (Forum) by Svevarn on 9/23/2009
  • Assign value to column with reference, using entity framework

    Hello I have a problem assigning a value to an entity that has a reference. I get the intellisense and all but I get a null-reference exception when I try to assign it to the object passed into the function that saves to database. public ActionResult BookingViewEdit([Bind(Include = "BookingViewID,Enabled,ObjectLimit,RSSenabled")]BookingView bv, int selCustomers) { bv.Customers.CustomerID = selCustomers; _bvs.SaveBookingView(bv); Whats needed to do to assign the value for CustomerID? the
    Posted to ASP.NET MVC (Forum) by Svevarn on 9/23/2009
  • Re: There is no data with key blah

    yep I get: "There is no ViewData item with the key 'dropObjectcategories' of type 'IEnumerable<SelectListItem>'."
    Posted to ASP.NET MVC (Forum) by Svevarn on 9/2/2009
  • Re: There is no data with key blah

    Seems like the problem is when the modelstate contains errors......... how can I modify the: return View("ObjectEdit", new BookingObjectsAdminEditViewModel { BookingObject = bookingobject }) so it works when modelstate contains errors? do I have to retrieve all multiselect-lists again? since the Multilists returns a list of int's? i.e MultiSelectList dropObjectcategories = new MultiSelectList(_bs.GetObjectcategories(), "ObjectcategoryID", "ObjectcategoryName", selectedObjectcategoryIDs
    Posted to ASP.NET MVC (Forum) by Svevarn on 9/2/2009
Page 1 of 16 (158 items) 1 2 3 4 5 Next > ... Last ยป