Vote count:
0
I'm trying to learn c# and asp.net webforms and am working on an application that is similar to how reddit or facebook might function. Users have the ability to create accounts, send and accept friend requests, leave wall posts etc.
I have implemented the ability to send a friend request, but am stuck on the part where a user can accept the request. Here is the c#:
using (Database.DataModelDataContext db = new Database.DataModelDataContext())
{
//Guid RequesterId = new Guid(Request.QueryString["ID"]);
CRANK.Database.Friendship RequestAccept = new Database.Friendship
{
ID = Guid.NewGuid(),
UserA = base.UserId,
UserB =
};
db.Friendships.InsertOnSubmit(RequestAccept);
db.SubmitChanges();
}
So as you can see, UserA would be added to the database with the logged-in users ID. I can't figure out how to get the information for UserB or the person that the original friend request was sent from. I'm assuming we can somehow grab it from the code in asp.net.
asked 49 secs ago
Aucun commentaire:
Enregistrer un commentaire