Question

I have created a website using Visual Studio 2010 and I have several hundred users, each with their own dedicated page. After the user logs in, I want them to be redirected to their dedicated page. For example, user 2460, after logging in, should be redirected to 2460.aspx. I cant seem to figure out how to accomplish this effectively. The farthest I've gotten is to redirect everyone to the same page after logging in. Any thoughts?

Était-ce utile?

La solution

If you know the page that they have to go to, just build the URL and do a Response.Redirect to it.

var userId = GetUserId(); // However you get this value

// After they log In
Response.Redirect("~/" + userId + ".aspx");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top