This is driving me crazy, apologies if this is simple, but I cant seem to find the answer to this.
I'm learning asp.net 2.0 with visual web developer, and am developing a simple banking website for practice. Its uses windows authentication with AD, which is working great.
I have 2 basic tables in an sql 2005 express db:
Accounts:
Account No (Int)
UserName (nvarchar(50))
Balance (money)
Tranactions
Account No (Int) - Foriegn Key to above.
Date (smalldate)
Amount (money)
Ok now on a form, I have a label control which picks up the windows username from HttpContext.Current.User.Identity.Name
and I have a data source which queries the Accounts table passing the value of this label in.
Now I can set a grid view, form view, etc to pull the details of that particular record, to look up the account.
What I am trying to do, is reference a label control to get the account no (as I will have another data source which will be based on the value of this control)
What I would like to do is populate a label control with account number, or be able to reference the data items from the formview control in code in the aspx.vb code file.
Hope this makes sense and am sure this is very easy...
Many thanks....
Fraser
I'm learning asp.net 2.0 with visual web developer, and am developing a simple banking website for practice. Its uses windows authentication with AD, which is working great.
I have 2 basic tables in an sql 2005 express db:
Accounts:
Account No (Int)
UserName (nvarchar(50))
Balance (money)
Tranactions
Account No (Int) - Foriegn Key to above.
Date (smalldate)
Amount (money)
Ok now on a form, I have a label control which picks up the windows username from HttpContext.Current.User.Identity.Name
and I have a data source which queries the Accounts table passing the value of this label in.
Now I can set a grid view, form view, etc to pull the details of that particular record, to look up the account.
What I am trying to do, is reference a label control to get the account no (as I will have another data source which will be based on the value of this control)
What I would like to do is populate a label control with account number, or be able to reference the data items from the formview control in code in the aspx.vb code file.
Hope this makes sense and am sure this is very easy...
Many thanks....
Fraser