protected void Page_Load(object sender, EventArgs e) { User usr = new User(); StoryList sl = new StoryList(); Guid userID = new Guid(Request.QueryString["UserID"]); sl.GetByUserID(userID); rptUsrStories.DataSource = sl.List; rptUsrStories.DataBind(); }
void ddlStory_Populate() { //make a new StoryList called storyList StoryList storyList = new StoryList(); //Get right storyList based on UserID (stored in a sesson) storyList = storyList.GetByUserID(new Guid(Session["UserID"].ToString())); //bind the list to ddlStory ddlStory.DataSource = storyList.List; ddlStory.DataTextField = "Title"; ddlStory.DataValueField = "ID"; ddlStory.DataBind(); }
protected void ddlStory_Populate() { //make a new storylist StoryList sl = new StoryList(); //get the right list of stories by the userID sl = sl.GetByUserID(userID); //populate the ddl with the list of stories ddlStory.DataSource = sl.List; ddlStory.DataTextField = "Title"; ddlStory.DataValueField = "ID"; ddlStory.DataBind(); }