When my user logs on they suppy a username thats checked off a db to allow access. This username is the unique identifier for all queries that are run throughout the access. What is the best way to pass this between pages. I will have a number of clients accessing at the same time. The variable is a six character alphanumeric.
any ideas will be accepted gratefully....oh security is a key issue as i dont want users getting access to eachothers identifier.
tia
pecSee if below two links could helps for your question
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskpassingvaluesbetweenwebformspages.asp
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconpassingservercontrolvaluesbetweenpages.asp
If not you could capture the value in sessions and you can use it in all the pages!
Hope it helps!
hi
i followed the first links eg...but when i use sourcepage.property1 it isnt within the object
any ideas
pec
In this given example in first page he given a property1 as property, so if you have that then only you will able to access it!
Hope it helps!
hi,
I had set the property code with in my <script> in html. When i moved it to the vb it worked but when i ran it the called page gave this error...even though i have placed the Public sourcepage As WebForm1 in the right place?
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'sourcepage' is not declared.
Source Error:
Line 15:
Line 16: If Not IsPostBack Then
Line 17: sourcepage = CType(Context.Handler, logon)
Line 18: dim strUserName as string = sourcepage.Username
Line 19: mydatagrid.Visible = False
tia pec
Declare sourcepage, then use it!
Ex: Dim sourcepage As PreviousPage
In this case PreviousPage is the first page reference name!
That could solve your problem!
0 comments:
Post a Comment