Forums
This topic is locked
automatic insertion of username into form
Posted 12 Jul 2001 12:58:37
1
has voted
12 Jul 2001 12:58:37 marcus wilkinson posted:
As a newbie to Ultradev and somebody who doesn't know how to code in ASP per se, does anybody know how I can insert the username used to log into a restricted page directly into a form (will have to be hidden field) using ultradev. I imagine it would use session variables but I'm unsure how to implement this. Any help would be greatly appreciated.Replies
Replied 12 Jul 2001 15:41:44
12 Jul 2001 15:41:44 Joel Martinez replied:
well, first of all, when the person logs in, you need to set a session variable with that value... if you're using the ultradev login SB, I'm not sure, but I think that it sets session("MM_Username" for you, but you may want to check the code just in case.
if it doesn't then just set a session variable. as far as putting it in a hidden field, that's actually not nescessary if you've got the session, because you can just refer to the session when you need the value... but if for some reason you do need it, here goes:
<input type="hidden" name="name" value="<%=session("username"%>">
hope that was enough,
Joel Martinez
----------
Is this thing on?....
if it doesn't then just set a session variable. as far as putting it in a hidden field, that's actually not nescessary if you've got the session, because you can just refer to the session when you need the value... but if for some reason you do need it, here goes:
<input type="hidden" name="name" value="<%=session("username"%>">
hope that was enough,
Joel Martinez
----------
Is this thing on?....
Replied 13 Jul 2001 14:36:32
13 Jul 2001 14:36:32 marcus wilkinson replied:
thanks a lothave got it working now