Search

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

Matching Posts

  • Linq "Take" method: Sequence Contains No Elements

    I'm using the Take method in Linq: public MyObject GetMyObject() { return (from myObject in db.MyObjects where (whatever) orderby myObject.date descending select myObject).Take(1).Single(); } So as you can see, myObject contains a date field and I'd like to grab the latest one. Sometimes, however, the where clause will result in an empty set, this is both expected and desired. However, if it is an empty set, I cannot use the Take object, lest it result in the error message in the subject
  • Re: How to start?

    Sweet, well good luck. This forum is great if you get hung up on something. The best way to practice your skills when developing an app is to think of something you would enjoy making. If you have fun making it, it is much easier to learn.
    Posted to Getting Started (Forum) by AceCorban on 11/19/2009
  • Linq to another Database

    Let's say there is a master application that has a database, and other applications that are built as sub applications. They need to have their own databases, but might need to share some pieces of data in the master database (even associate with them through foreign keys if possible). The question is can this be done? I know SQL allows pulls from different databases if the database name is used and the user has access, but can Linq create those associations as parent/child entities?
  • Re: How to start?

    Start here: http://www.asp.net/get-started/ There are links to helpful videos that should get you developing some basic apps pretty quickly. I'd start by installing visual web developer and following along with those videos.
    Posted to Getting Started (Forum) by AceCorban on 11/17/2009
  • Re: How to start?

    In that case, I like the Nerd Dinner tutorial: http://nerddinnerbook.s3.amazonaws.com/Intro.htm It goes over how to implement a fairly complex web application, but really walks you through it step by step. A disclaimer: It goes over the MVC framework, which is different from WebForms. MVC is pretty awesome in many respects, but I've actually shelved my MVC knowledge for a while until IIS 7 hosting is more prominent (hosting an MVC app on IIS 6- can be a pain for a lot of reasons). That said,
    Posted to Getting Started (Forum) by AceCorban on 11/17/2009
  • Re: Does Session.Abandon delete the Cookie?

    The quick answer is: "No, it does not delete the sessionID cookie". I actually had this issue and posted this thread about it: http://forums.asp.net/t/1446995.aspx budugu had a neat suggestion to do this: Session.Abandon(); Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", "")); which basically just overwrites the existing cookie with blank information.
    Posted to State Management (Forum) by AceCorban on 11/17/2009
  • Re: Help with Linq Query to find tagged items

    Got it: var query = from item in db.Items where (item.title.Contains(searchStr) || ((from itemTag in db.ItemTags where ((itemTag.itemId ==item.id) &&(itemTag.Tag.title.Contains(searchStr))) select itemTag).Count() > 0)) select item;
  • Re: GridTemplate based on value of Container.DataItem["status"]

    Turns out I can do this: <a href="javascript:<%# ((Convert.ToInt32(Container.DataItem["status"]) == Globals.ENABLED) ? "disable" : "enable") %>Object('<%# Container.DataItem["ID"] %>');"><%# ((Convert.ToInt32(Container.DataItem["status"]) == Globals.ENABLED) ? "Disable" : "Enable") %></a>
    Posted to Getting Started (Forum) by AceCorban on 11/16/2009
  • Re: TreeView state saved to session, but during which event?

    Well, this feature was put on the backburner with everything else that is going on, so I never got to find a solution for this yet.
    Posted to Getting Started (Forum) by AceCorban on 11/13/2009
  • Help with Linq Query to find tagged items

    I have a table we'll call "Item". It has a varchar "title" and some other fields. There is also a "Tag" table which is nothing more than a varchar "title". The same tag could very well be associated with many items, so there is a many-to-one association table I call ItemTag that has a foreign key to Tag and Item. So within Linq, my Item object has a list of ItemTags that are associated with it so I could do something like this to, say, display all tags
Page 1 of 104 (1035 items) 1 2 3 4 5 Next > ... Last »