LINQ & Stored Procedure RRS feed

  • Question

  • I'm trying to accomplish the following

    <asp:Label text='<%# Eval(mydatacontextstuff.mystoredprocedure,"myparameter") %>' </asp:label>

    I can't seem to make it work. Is something like this possible?

    Wednesday, March 18, 2009 12:54 PM


  • It is possible but I tend to use the code behind for this.

    <asp:Label ID="lblName" runat="server' />

    Code Behind:

    DBContext db = new DBContext();
    lblName.Text = db.mystoredprocedure("parameter").Single().Property.ToString();

    Hope this helps.
    Thursday, March 19, 2009 4:39 AM