This story went very well. I also got to learn more about how to customize fields in a gridview a little better.
Basically, the requirement is to create a page that allows a user to see another student’s profile — that is, their alias, first name and last name, and About Me text. It’s actually quite similar to the user’s own profile/account page, except that this (for obvious reasons) shouldn’t be editable, and that we’re not retrieving the logged-in user’s id, but specifying one on the request.
After basically taking the My Profile markup and modifying it for this page, it was nearly done. Putting a test parameter on the request wasn’t too difficult, and I find it interesting how the URL ends up being something like:
~/Classes/ViewStudent.aspx?user=15ea2612-f67c-4e00-874b-19a216316b32
It seems pretty unwieldy, but when I think about it, this is good in that it makes it harder to guess what someone’s userid is. Not that it wouldn’t be too difficult though.
Anyway, here is the View Student page:

The second part of this was to link to this page from the View Class and View Study Group pages.. specifically to change the text of the user’s alias into a hyperlink. I did some exploring and figured out how to configure a hyperlink field that accomplished this. Below is a screenshot of the View Study Group page with the new hyperlinked field (which I labelled “User”).







Subscribe to China WBI