This topic is locked
[SOLVED]

 How get a value to fill form

2/4/2011 10:10:30 AM
ASPRunnerPro General questions
C
CodeIsPoetry author

Hi there!
Does any one know how can I get the name that I log in (I can use Session("UserID")), search that name in a table get the Code I mean Id that is a number and fill one form of the Add page.
In this Image you can see what i want.

I want to get the Username ID (integer) to put in the field : idun


Does not make sense you have to fill always the idun with the ID that is associated to the login name.
I think a need to make a SQL Query give the User name [Session("UserID")] and get the Id to put int the field Idun.
Thank you !!!
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=16365&image=2&table=forumtopics' class='bbc_emoticon' alt=';)' />

Sergey Kornilov admin 2/4/2011

This article explains how you can save data from login table in session variables:

http://xlinesoft.com/asprunnerpro/docs/save_user_data_in_session_variables.htm
Then you can use this session variable as a default value of Idun field.

C
CodeIsPoetry author 2/5/2011



This article explains how you can save data from login table in session variables:

http://xlinesoft.com/asprunnerpro/docs/save_user_data_in_session_variables.htm
Then you can use this session variable as a default value of Idun field.



Thank you so much!
I am going to try this <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=56272&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />