protected void rptUserFollowing_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Message") { var chatroom = ChatRoomDAO.GetChatRoom(currentUser.Id, Int32.Parse(e.CommandArgument.ToString())); if (chatroom != null) { Response.Redirect("/Profile/Chat.aspx?chatroom=" + chatroom.Id); } } }
protected void btMessage_Click(object sender, EventArgs e) { var chatroom = ChatRoomDAO.GetChatRoom(currentUser.Id, requestedUser.Id); Response.Redirect("/Profile/Chat.aspx?chatroom=" + chatroom.Id); }