A: 

You will have to bind the value of std.SessionCode to the ObjectDataSource in code-behind. In the "Configure Data Source" screen above, choose None for now. You'll be binding it dynamically.

If your ObjectDataSource looks like this:

<asp:ObjectDataSource ID="myObjDS" runat="server"
  TypeName="YourNamespace.Notice"
  SelectMethod="GetNoticesBySessionCode">
  <SelectParameters>
    <asp:Parameter Name="sessionCode" Type="String"/>
  </SelectParameters>
</asp:ObjectDataSource>

Then

if (std != null)
{
  //all the other code you have above.
  myObjDS.SelectParameters["sessionCode"].DefaultValue = std.SessionCode;
  myObjDS.DataBind(); //ensure you actually need this, may cause a double roundtrip to your DB.
}
p.campbell
A: 

The above answer has it pretty much well covered. Just to add, you can also add parameters in the onselecting event of the objectdatasource.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.selecting.aspx

Steve